merge and resolve conflict
This commit is contained in:
10
src/app/(withAuth)/dashboard/inquiry_privacy/fencing/page.js
Normal file
10
src/app/(withAuth)/dashboard/inquiry_privacy/fencing/page.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import InquiryPrivacyFencingPage from "@/components/dashboard/inquiryPrivacyFencing";
|
||||
|
||||
const Page = () => {
|
||||
|
||||
return (
|
||||
<InquiryPrivacyFencingPage />
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
||||
@@ -1,5 +1,9 @@
|
||||
const Page = () => {
|
||||
return <div>dashboard</div>;
|
||||
|
||||
return (
|
||||
<>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import { Box, Stack } from "@mui/material";
|
||||
import HeaderWithLogo from "@/components/layouts/dashboard/headerWithLogo";
|
||||
import HeaderWithSidebar from "@/components/layouts/dashboard/headerWithSidebar";
|
||||
import "react-toastify/dist/ReactToastify.css";
|
||||
|
||||
const Template = ({ children }) => {
|
||||
return (
|
||||
<Stack>
|
||||
<HeaderWithLogo />
|
||||
<Box>
|
||||
<HeaderWithSidebar>{children}</HeaderWithSidebar>
|
||||
</Box>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
export default Template;
|
||||
12
src/app/(withAuth)/layout.js
Normal file
12
src/app/(withAuth)/layout.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import WithAuthMiddleware from "@/core/middlewares/withAuth";
|
||||
import { AuthProvider } from "@/lib/contexts/auth";
|
||||
|
||||
const Layout = ({ children }) => {
|
||||
return (
|
||||
<AuthProvider>
|
||||
<WithAuthMiddleware>{children}</WithAuthMiddleware>
|
||||
</AuthProvider>
|
||||
);
|
||||
};
|
||||
|
||||
export default Layout;
|
||||
3
src/app/default.js
Normal file
3
src/app/default.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function Default() {
|
||||
return null;
|
||||
}
|
||||
57
src/app/lfwd/page.js
Normal file
57
src/app/lfwd/page.js
Normal file
@@ -0,0 +1,57 @@
|
||||
"use client";
|
||||
|
||||
import { GET_LOGIN_ROUTE } from "@/core/utils/routes";
|
||||
import useRequest from "@/lib/hooks/useRequest";
|
||||
import { Button, Stack, Typography, Zoom } from "@mui/material";
|
||||
import Link from "next/link";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
const Page = ({ searchParams }) => {
|
||||
const { username } = searchParams;
|
||||
const [login, setLogin] = useState(0);
|
||||
const request = useRequest();
|
||||
|
||||
useEffect(() => {
|
||||
const login = async () => {
|
||||
try {
|
||||
await request(`${GET_LOGIN_ROUTE}?username=${username}`);
|
||||
setLogin(1);
|
||||
} catch (error) {
|
||||
setLogin(2);
|
||||
}
|
||||
};
|
||||
|
||||
login();
|
||||
}, []);
|
||||
|
||||
const retry = async () => {
|
||||
setLogin(0);
|
||||
try {
|
||||
await request(`${GET_LOGIN_ROUTE}?username=${username}`);
|
||||
setLogin(1);
|
||||
} catch (error) {
|
||||
setLogin(2);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Stack alignItems={"center"} justifyContent={"center"} sx={{ height: "100%" }} spacing={2}>
|
||||
<Typography variant="h5">
|
||||
{login === 0
|
||||
? "درحال دریافت مجوز برای ارتباط با سرور..."
|
||||
: login === 1
|
||||
? "ارتباط با سرور برقرار شد."
|
||||
: "ارتباط با سرور برقرار نشد. مشکلی وجود دارد."}
|
||||
</Typography>
|
||||
<Zoom in={login === 1}>
|
||||
<Button component={Link} href="/">
|
||||
ورود به سامانه
|
||||
</Button>
|
||||
</Zoom>
|
||||
<Zoom in={login === 2}>
|
||||
<Button onClick={retry}>تلاش مجدد</Button>
|
||||
</Zoom>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
export default Page;
|
||||
@@ -1,8 +1,8 @@
|
||||
"use client";
|
||||
import HomeComponent from "@/components/home";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
function Page() {
|
||||
return <HomeComponent />;
|
||||
redirect("/dashboard", "replace");
|
||||
return null;
|
||||
}
|
||||
|
||||
export default Page;
|
||||
|
||||
@@ -2,7 +2,6 @@ import cacheProviderRtl from "@/core/utils/cacheRtl";
|
||||
import { CssBaseline, ThemeProvider } from "@mui/material";
|
||||
import theme from "@/core/utils/theme";
|
||||
import { AppRouterCacheProvider } from "@mui/material-nextjs/v14-appRouter";
|
||||
import "react-toastify/dist/ReactToastify.css";
|
||||
import "^/global.scss";
|
||||
import { ToastContainer } from "react-toastify";
|
||||
|
||||
@@ -12,7 +11,8 @@ const Template = ({ children }) => {
|
||||
<ThemeProvider theme={theme}>
|
||||
<CssBaseline />
|
||||
{children}
|
||||
<ToastContainer rtl containerId="datatable" closeButton={false} />
|
||||
<ToastContainer rtl containerId="filtering" closeButton={false} />
|
||||
<ToastContainer rtl containerId="request_data" />
|
||||
</ThemeProvider>
|
||||
</AppRouterCacheProvider>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user