Create toast provider
This commit is contained in:
12
frontend/types/toast.ts
Normal file
12
frontend/types/toast.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export type ToastProps = {
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
export type ToastMessages = {
|
||||
needSignedIn: string;
|
||||
sessionExpired: string;
|
||||
};
|
||||
|
||||
export type ToastContextType = {
|
||||
showToast: (text: string, mode: string) => {};
|
||||
};
|
||||
@@ -1,3 +1,5 @@
|
||||
import { ToastMessages } from './toast';
|
||||
|
||||
export type UserType = {
|
||||
id: number | null;
|
||||
email: string;
|
||||
@@ -8,6 +10,7 @@ export type UserType = {
|
||||
} | null;
|
||||
|
||||
export type TokenProps = {
|
||||
toastMessages: ToastMessages;
|
||||
locale: string;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user