From 0826aa10035f9d60f13b9f96d12e46e0be2d570a Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Wed, 19 Mar 2025 16:50:11 +0000 Subject: [PATCH] fixed typing --- src/Components/AppShell/ContextWrapper.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Components/AppShell/ContextWrapper.tsx b/src/Components/AppShell/ContextWrapper.tsx index 59cbdc49..3eba67ee 100644 --- a/src/Components/AppShell/ContextWrapper.tsx +++ b/src/Components/AppShell/ContextWrapper.tsx @@ -15,9 +15,20 @@ import { TagsProvider } from '#components/Map/hooks/useTags' import { AppStateProvider } from './hooks/useAppState' +import type { CloseButtonProps } from 'react-toastify' + // Helper context to determine if the ContextWrapper is already present. const ContextCheckContext = createContext(false) +const CloseButton = ({ closeToast }: CloseButtonProps) => ( + +) + export const ContextWrapper = ({ children }: { children: React.ReactNode }) => { const isWrapped = useContext(ContextCheckContext) @@ -67,11 +78,7 @@ export const Wrappers = ({ children }) => { draggable pauseOnHover theme='light' - closeButton={ - - } + closeButton={CloseButton} /> {children}