track feeds cache states for skeleton

This commit is contained in:
plebeius.eth
2023-07-14 20:57:47 +02:00
parent e08c7a6b13
commit a7035ae78c
4 changed files with 51 additions and 17 deletions
+8
View File
@@ -23,6 +23,14 @@ const useGeneralStore = create((set) => ({
editedComment: '',
setEditedComment: (comment) => set({ editedComment: comment }),
feedCacheStates: {},
setFeedCacheState: (address, isCached) => set((prev) => ({
feedCacheStates: {
...prev.feedCacheStates,
[address]: isCached,
}
})),
isAuthorDelete: false,
setIsAuthorDelete: (isAuthorDelete) => set({ isAuthorDelete }),