mirror of
https://github.com/remvze/moodist.git
synced 2025-12-18 17:34:17 +00:00
17 lines
413 B
TypeScript
17 lines
413 B
TypeScript
import { useEffect } from 'react';
|
|
|
|
import { useSoundStore, useNoteStore, usePresetStore } from '@/store';
|
|
|
|
interface StoreConsumerProps {
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export function StoreConsumer({ children }: StoreConsumerProps) {
|
|
useEffect(() => {
|
|
useSoundStore.persist.rehydrate();
|
|
useNoteStore.persist.rehydrate();
|
|
usePresetStore.persist.rehydrate();
|
|
}, []);
|
|
|
|
return <>{children}</>;
|
|
}
|