hedgedoc/frontend/src/redux/store-provider.tsx
Tilman Vatteroth 8602645bea feat: migrate frontend app to nextjs app router
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-09-03 22:00:34 +02:00

19 lines
568 B
TypeScript

'use client'
/*
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { store } from './index'
import type { PropsWithChildren } from 'react'
import React from 'react'
import { Provider } from 'react-redux'
/**
* Sets the redux store for the children components.
*
* @param children The child components that should access the redux store
*/
export const StoreProvider: React.FC<PropsWithChildren<unknown>> = ({ children }) => {
return <Provider store={store}>{children}</Provider>
}