fixed title pages
This commit is contained in:
@@ -6,6 +6,7 @@ import {LoadingProvider} from "@/lib/app/contexts/loading";
|
|||||||
import {UserProvider} from "@/lib/app/contexts/user";
|
import {UserProvider} from "@/lib/app/contexts/user";
|
||||||
import "moment/locale/fa";
|
import "moment/locale/fa";
|
||||||
import {NextIntlProvider} from "next-intl";
|
import {NextIntlProvider} from "next-intl";
|
||||||
|
import TitlePage from "@/core/components/TitlePage";
|
||||||
|
|
||||||
const App = ({Component, pageProps}) => {
|
const App = ({Component, pageProps}) => {
|
||||||
return (
|
return (
|
||||||
@@ -14,6 +15,7 @@ const App = ({Component, pageProps}) => {
|
|||||||
<LanguageProvider>
|
<LanguageProvider>
|
||||||
<NextIntlProvider messages={pageProps.messages}>
|
<NextIntlProvider messages={pageProps.messages}>
|
||||||
<MuiLayout isBot={pageProps.isBot}>
|
<MuiLayout isBot={pageProps.isBot}>
|
||||||
|
<TitlePage text={pageProps.title}/>
|
||||||
<LoadingProvider>
|
<LoadingProvider>
|
||||||
<AppLayout isBot={pageProps.isBot}>
|
<AppLayout isBot={pageProps.isBot}>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
import DashboardFirstComponent from "@/components/dashboard/first";
|
import DashboardFirstComponent from "@/components/dashboard/first";
|
||||||
import TitlePage from "@/core/components/TitlePage";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<WithAuthMiddleware>
|
||||||
<TitlePage text="Dashboard.dashboard_page"/>
|
|
||||||
<DashboardFirstComponent/>
|
<DashboardFirstComponent/>
|
||||||
</WithAuthMiddleware>
|
</WithAuthMiddleware>
|
||||||
);
|
);
|
||||||
@@ -17,6 +15,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
|
title: "Dashboard.dashboard_page",
|
||||||
isBot,
|
isBot,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
import DashboardLoanFollowUpComponent from "@/components/dashboard/loan-follow-up";
|
import DashboardLoanFollowUpComponent from "@/components/dashboard/loan-follow-up";
|
||||||
import TitlePage from "@/core/components/TitlePage";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
export default function LoanFollowUp() {
|
export default function LoanFollowUp() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<WithAuthMiddleware>
|
||||||
<TitlePage text="LoanFollowUp.loan_follow_up_page"/>
|
|
||||||
<DashboardLoanFollowUpComponent/>
|
<DashboardLoanFollowUpComponent/>
|
||||||
</WithAuthMiddleware>
|
</WithAuthMiddleware>
|
||||||
);
|
);
|
||||||
@@ -17,6 +15,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
|
title: "LoanFollowUp.loan_follow_up_page",
|
||||||
isBot,
|
isBot,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
import DashboardLoanRequestComponent from "@/components/dashboard/loan-request";
|
import DashboardLoanRequestComponent from "@/components/dashboard/loan-request";
|
||||||
import TitlePage from "@/core/components/TitlePage";
|
|
||||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
export default function LoanRequest() {
|
export default function LoanRequest() {
|
||||||
return (
|
return (
|
||||||
<WithAuthMiddleware>
|
<WithAuthMiddleware>
|
||||||
<TitlePage text="LoanFollowUp.loan_follow_up_page"/>
|
|
||||||
<DashboardLoanRequestComponent/>
|
<DashboardLoanRequestComponent/>
|
||||||
</WithAuthMiddleware>
|
</WithAuthMiddleware>
|
||||||
);
|
);
|
||||||
@@ -17,6 +15,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
|
title: "LoanRequest.loan_request_page",
|
||||||
isBot,
|
isBot,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import FirstComponent from "@/components/first";
|
import FirstComponent from "@/components/first";
|
||||||
import TitlePage from "@/core/components/TitlePage";
|
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TitlePage text="first_page"/>
|
|
||||||
<FirstComponent/>
|
<FirstComponent/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
@@ -16,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
|
title: "first_page",
|
||||||
isBot,
|
isBot,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import LoginComponent from "@/components/login";
|
import LoginComponent from "@/components/login";
|
||||||
import TitlePage from "@/core/components/TitlePage";
|
|
||||||
import WithoutAuthMiddleware from "@/middlewares/WithoutAuth";
|
import WithoutAuthMiddleware from "@/middlewares/WithoutAuth";
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import "react-toastify/dist/ReactToastify.css";
|
import "react-toastify/dist/ReactToastify.css";
|
||||||
@@ -10,7 +9,6 @@ export default function Login() {
|
|||||||
const {directionApp} = useDirection();
|
const {directionApp} = useDirection();
|
||||||
return (
|
return (
|
||||||
<WithoutAuthMiddleware>
|
<WithoutAuthMiddleware>
|
||||||
<TitlePage text="Titles.title_login_page"/>
|
|
||||||
<LoginComponent/>
|
<LoginComponent/>
|
||||||
{directionApp === "rtl" ? <ToastContainer rtl/> : <ToastContainer ltr/>}
|
{directionApp === "rtl" ? <ToastContainer rtl/> : <ToastContainer ltr/>}
|
||||||
</WithoutAuthMiddleware>
|
</WithoutAuthMiddleware>
|
||||||
@@ -22,6 +20,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
|
title: "Titles.title_login_page",
|
||||||
isBot,
|
isBot,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import RegisterComponent from "@/components/register";
|
import RegisterComponent from "@/components/register";
|
||||||
import TitlePage from "@/core/components/TitlePage";
|
|
||||||
import WithoutAuthMiddleware from "@/middlewares/WithoutAuth";
|
import WithoutAuthMiddleware from "@/middlewares/WithoutAuth";
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import "react-toastify/dist/ReactToastify.css";
|
import "react-toastify/dist/ReactToastify.css";
|
||||||
@@ -10,7 +9,6 @@ export default function Register() {
|
|||||||
const {directionApp} = useDirection();
|
const {directionApp} = useDirection();
|
||||||
return (
|
return (
|
||||||
<WithoutAuthMiddleware>
|
<WithoutAuthMiddleware>
|
||||||
<TitlePage text="Titles.title_register_page"/>
|
|
||||||
<RegisterComponent/>
|
<RegisterComponent/>
|
||||||
{directionApp === "rtl" ? <ToastContainer rtl/> : <ToastContainer ltr/>}
|
{directionApp === "rtl" ? <ToastContainer rtl/> : <ToastContainer ltr/>}
|
||||||
</WithoutAuthMiddleware>
|
</WithoutAuthMiddleware>
|
||||||
@@ -22,6 +20,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
|
title: "Titles.title_register_page",
|
||||||
isBot,
|
isBot,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import NavyComponent from "@/components/register/navy";
|
import NavyComponent from "@/components/register/navy";
|
||||||
import TitlePage from "@/core/components/TitlePage";
|
|
||||||
import WithoutAuthMiddleware from "@/middlewares/WithoutAuth";
|
import WithoutAuthMiddleware from "@/middlewares/WithoutAuth";
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import "react-toastify/dist/ReactToastify.css";
|
import "react-toastify/dist/ReactToastify.css";
|
||||||
@@ -10,7 +9,6 @@ export default function Register() {
|
|||||||
const {directionApp} = useDirection();
|
const {directionApp} = useDirection();
|
||||||
return (
|
return (
|
||||||
<WithoutAuthMiddleware>
|
<WithoutAuthMiddleware>
|
||||||
<TitlePage text="Titles.title_register_navy_page"/>
|
|
||||||
<NavyComponent/>
|
<NavyComponent/>
|
||||||
{directionApp === "rtl" ? <ToastContainer rtl/> : <ToastContainer ltr/>}
|
{directionApp === "rtl" ? <ToastContainer rtl/> : <ToastContainer ltr/>}
|
||||||
</WithoutAuthMiddleware>
|
</WithoutAuthMiddleware>
|
||||||
@@ -22,6 +20,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
|
title: "Titles.title_register_navy_page",
|
||||||
isBot,
|
isBot,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import WelfareServicesComponent from "@/components/register/welfare-services";
|
import WelfareServicesComponent from "@/components/register/welfare-services";
|
||||||
import TitlePage from "@/core/components/TitlePage";
|
|
||||||
import WithoutAuthMiddleware from "@/middlewares/WithoutAuth";
|
import WithoutAuthMiddleware from "@/middlewares/WithoutAuth";
|
||||||
import {parse} from "next-useragent";
|
import {parse} from "next-useragent";
|
||||||
import "react-toastify/dist/ReactToastify.css";
|
import "react-toastify/dist/ReactToastify.css";
|
||||||
@@ -10,7 +9,6 @@ export default function Register() {
|
|||||||
const {directionApp} = useDirection();
|
const {directionApp} = useDirection();
|
||||||
return (
|
return (
|
||||||
<WithoutAuthMiddleware>
|
<WithoutAuthMiddleware>
|
||||||
<TitlePage text="Titles.title_register_welfare_services_page"/>
|
|
||||||
<WelfareServicesComponent/>
|
<WelfareServicesComponent/>
|
||||||
{directionApp === "rtl" ? <ToastContainer rtl/> : <ToastContainer ltr/>}
|
{directionApp === "rtl" ? <ToastContainer rtl/> : <ToastContainer ltr/>}
|
||||||
</WithoutAuthMiddleware>
|
</WithoutAuthMiddleware>
|
||||||
@@ -22,6 +20,7 @@ export async function getServerSideProps({req, locale}) {
|
|||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||||
|
title: "Titles.title_register_welfare_services_page",
|
||||||
isBot,
|
isBot,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user