x
This commit is contained in:
1 parent
74b9670c79
commit
73590e06c4
37 files changed
+964
-709
No files matched your search
@@ -4,6 +4,9 @@ import CartDrawer from './CartDrawer';
|
||||
import ScrollToTop from './ScrollToTop';
|
||||
import { useEffect, type ReactNode } from 'react';
|
||||
import i18n from '../lib/i18n';
|
||||
import { useCartStore } from '../store/cartStore';
|
||||
import { useWishlistStore } from '../store/wishlistStore';
|
||||
import { useAuthStore } from '../store/authStore';
|
||||
|
||||
export default function ClientProviders({ children }: { children: ReactNode }) {
|
||||
useEffect(() => {
|
||||
@@ -17,6 +20,12 @@ export default function ClientProviders({ children }: { children: ReactNode }) {
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
void useCartStore.persist.rehydrate()
|
||||
void useWishlistStore.persist.rehydrate()
|
||||
void useAuthStore.persist.rehydrate()
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<>
|
||||
<ScrollToTop />
|
||||
|
||||
Reference in new issue
Block a user