authButton fixed
This commit is contained in:
@@ -3,10 +3,10 @@ import { create } from 'zustand';
|
||||
|
||||
type CabinetNavZustand = {
|
||||
navItem: CabinetSection;
|
||||
setNavItem: (item: string) => void;
|
||||
setNavItem: (item: CabinetSection) => void;
|
||||
};
|
||||
|
||||
export const useCabinetNav = create<CabinetNavZustand>((set) => ({
|
||||
navItem: 'dashboard',
|
||||
setNavItem: (item: string) => set({ navItem: item || 'dash' }),
|
||||
setNavItem: (item: CabinetSection) => set({ navItem: item }),
|
||||
}));
|
||||
|
||||
@@ -111,7 +111,9 @@ function AuthButtons() {
|
||||
if (subItem.url !== '/cabinet') {
|
||||
clearTokens();
|
||||
} else {
|
||||
setNavItem(subItem.key);
|
||||
setNavItem(
|
||||
subItem.key as import('@/widgets/cabinet/lib/types').CabinetSection,
|
||||
);
|
||||
}
|
||||
}}
|
||||
item={subItem}
|
||||
|
||||
Reference in New Issue
Block a user