Add provider for PopupFormContext

This commit is contained in:
Maximilian Harz 2025-04-14 17:47:21 +02:00
parent f8e9cca011
commit 7ba55a7a6e
2 changed files with 20 additions and 17 deletions

View File

@ -10,6 +10,7 @@ import { ItemsProvider } from '#components/Map/hooks/useItems'
import { LayersProvider } from '#components/Map/hooks/useLayers'
import { LeafletRefsProvider } from '#components/Map/hooks/useLeafletRefs'
import { PermissionsProvider } from '#components/Map/hooks/usePermissions'
import { PopupFormProvider } from '#components/Map/hooks/usePopupForm'
import { SelectPositionProvider } from '#components/Map/hooks/useSelectPosition'
import { TagsProvider } from '#components/Map/hooks/useTags'
@ -66,22 +67,24 @@ export const Wrappers = ({ children }) => {
<QueryClientProvider client={queryClient}>
<AppStateProvider>
<ClusterRefProvider>
<QuestsProvider initialOpen={true}>
<ToastContainer
position='top-right'
autoClose={2000}
hideProgressBar
newestOnTop={false}
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
theme='light'
closeButton={CloseButton}
/>
{children}
</QuestsProvider>
<PopupFormProvider>
<QuestsProvider initialOpen={true}>
<ToastContainer
position='top-right'
autoClose={2000}
hideProgressBar
newestOnTop={false}
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
theme='light'
closeButton={CloseButton}
/>
{children}
</QuestsProvider>
</PopupFormProvider>
</ClusterRefProvider>
</AppStateProvider>
</QueryClientProvider>

View File

@ -22,7 +22,7 @@ interface Props {
children?: React.ReactNode
}
export const ClusterRefProvider: React.FunctionComponent<Props> = ({ children }: Props) => (
export const PopupFormProvider: React.FunctionComponent<Props> = ({ children }: Props) => (
<PoupFormContext.Provider value={usePopupFormManager()}>{children}</PoupFormContext.Provider>
)