'use client' import React, { useRef } from 'react'; import { Provider } from 'react-redux'; import { makeStore, AppStore } from '../redux/store'; export default function StoreProvider({ children, }: { children: React.ReactNode }) { const storeRef = useRef(null) // Create the store instance the first time this renders if (!storeRef.current) { storeRef.current = makeStore() } return {children} }