"use client";

/**
 *
 * @description this is the redux store that wrap the entire app ( client side routes )
 * * source : https://mongoosejs.com/docs/6.x/docs/typescript.html
 */

import React from "react"
import { Provider } from "react-redux"
import { PersistGate } from 'redux-persist/integration/react';
import { store, persistor } from './store';

export function ReduxProvider({children} : {children  : React.ReactNode})
{
    return (
        <Provider store={store}>
            <PersistGate loading={null} persistor={persistor}>
                {children}
            </PersistGate>
        </Provider>
    )
}