feat: modals

This commit is contained in:
2025-07-27 12:32:56 +04:00
parent 948480c219
commit fe6e87f97c
7 changed files with 66 additions and 1 deletions

View File

@ -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>