This commit is contained in:
Ren Amamiya
2023-10-03 16:24:09 +07:00
parent cdeb5afd28
commit 428d52f175
13 changed files with 146 additions and 161 deletions

View File

@@ -4,9 +4,11 @@ import { createJSONStorage, persist } from 'zustand/middleware';
interface SidebarState {
feeds: boolean;
chats: boolean;
communities: boolean;
integrations: boolean;
toggleFeeds: () => void;
toggleChats: () => void;
toggleCommunities: () => void;
toggleIntegrations: () => void;
}
@@ -15,9 +17,11 @@ export const useSidebar = create<SidebarState>()(
(set) => ({
feeds: true,
chats: false,
communities: true,
integrations: true,
toggleFeeds: () => set((state) => ({ feeds: !state.feeds })),
toggleChats: () => set((state) => ({ chats: !state.chats })),
toggleCommunities: () => set((state) => ({ communities: !state.communities })),
toggleIntegrations: () => set((state) => ({ integrations: !state.integrations })),
}),
{