We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f328ec commit 9f5d77eCopy full SHA for 9f5d77e
client/src/Providers/ToastContext.tsx
@@ -1,4 +1,4 @@
1
-import { createContext } from 'react';
+import { createContext, useContext } from 'react';
2
import type { TShowToast } from '~/common';
3
import { useToast } from '~/hooks';
4
@@ -10,6 +10,10 @@ export const ToastContext = createContext<ToastContextType>({
10
showToast: () => ({}),
11
});
12
13
+export function useToastContext() {
14
+ return useContext(ToastContext);
15
+}
16
+
17
export default function ToastProvider({ children }) {
18
const { showToast } = useToast();
19
0 commit comments