feat: modals
This commit is contained in:
@ -10,12 +10,20 @@ import { theme } from "@/theme";
|
||||
import "@/app/global.css";
|
||||
import { Notifications } from "@mantine/notifications";
|
||||
import ReduxProvider from "@/providers/ReduxProvider";
|
||||
import { ModalsProvider } from "@mantine/modals";
|
||||
import { modals } from "@/modals/modals";
|
||||
|
||||
export const metadata = {
|
||||
title: "CRM LogiDex",
|
||||
description: "CRM LogiDex",
|
||||
};
|
||||
|
||||
declare module "@mantine/modals" {
|
||||
export interface MantineModalsOverride {
|
||||
modals: typeof modals;
|
||||
}
|
||||
}
|
||||
|
||||
type Props = {
|
||||
children: ReactNode;
|
||||
};
|
||||
@ -45,7 +53,13 @@ export default function RootLayout({ children }: Props) {
|
||||
<MantineProvider
|
||||
theme={theme}
|
||||
defaultColorScheme={"auto"}>
|
||||
<ReduxProvider>{children}</ReduxProvider>
|
||||
<ReduxProvider>
|
||||
<ModalsProvider
|
||||
labels={{ confirm: "Да", cancel: "Нет" }}
|
||||
modals={modals}>
|
||||
{children}
|
||||
</ModalsProvider>
|
||||
</ReduxProvider>
|
||||
<Notifications position="bottom-right" />
|
||||
</MantineProvider>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user