mirror of
https://github.com/remvze/moodist.git
synced 2025-12-18 01:14:17 +00:00
21 lines
594 B
TypeScript
21 lines
594 B
TypeScript
import { useEffect } from 'react';
|
|
|
|
import { useSoundStore } from '@/stores/sound';
|
|
import { useNoteStore } from '@/stores/note';
|
|
import { usePresetStore } from '@/stores/preset';
|
|
import { useCountdownTimers } from '@/stores/countdown-timers';
|
|
|
|
interface StoreConsumerProps {
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export function StoreConsumer({ children }: StoreConsumerProps) {
|
|
useEffect(() => {
|
|
useSoundStore.persist.rehydrate();
|
|
useNoteStore.persist.rehydrate();
|
|
usePresetStore.persist.rehydrate();
|
|
useCountdownTimers.persist.rehydrate();
|
|
}, []);
|
|
|
|
return <>{children}</>;
|
|
}
|