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 "moment/locale/fa";
|
||||
import {NextIntlProvider} from "next-intl";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
|
||||
const App = ({Component, pageProps}) => {
|
||||
return (
|
||||
@@ -14,6 +15,7 @@ const App = ({Component, pageProps}) => {
|
||||
<LanguageProvider>
|
||||
<NextIntlProvider messages={pageProps.messages}>
|
||||
<MuiLayout isBot={pageProps.isBot}>
|
||||
<TitlePage text={pageProps.title}/>
|
||||
<LoadingProvider>
|
||||
<AppLayout isBot={pageProps.isBot}>
|
||||
<Component {...pageProps} />
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import DashboardChangePasswordComponent from "@/components/dashboard/change-password";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||
import {parse} from "next-useragent";
|
||||
|
||||
export default function LoanFollowUp() {
|
||||
return (
|
||||
<WithAuthMiddleware>
|
||||
<TitlePage text="Dashboard.change_password"/>
|
||||
<DashboardChangePasswordComponent/>
|
||||
</WithAuthMiddleware>
|
||||
);
|
||||
@@ -17,6 +15,7 @@ export async function getServerSideProps({req, locale}) {
|
||||
return {
|
||||
props: {
|
||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||
title: "Dashboard.change_password",
|
||||
isBot,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import DashboardEditProfile from "@/components/dashboard/edit-profile";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||
import {parse} from "next-useragent";
|
||||
|
||||
export default function LoanFollowUp() {
|
||||
return (
|
||||
<WithAuthMiddleware>
|
||||
<TitlePage text="Dashboard.edit_profile"/>
|
||||
<DashboardEditProfile/>
|
||||
</WithAuthMiddleware>
|
||||
);
|
||||
@@ -17,6 +15,7 @@ export async function getServerSideProps({req, locale}) {
|
||||
return {
|
||||
props: {
|
||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||
title: "Dashboard.edit_profile",
|
||||
isBot,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import DashboardFirstComponent from "@/components/dashboard/first";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||
import {parse} from "next-useragent";
|
||||
|
||||
export default function Dashboard() {
|
||||
return (
|
||||
<WithAuthMiddleware>
|
||||
<TitlePage text="Dashboard.dashboard_page"/>
|
||||
<DashboardFirstComponent/>
|
||||
</WithAuthMiddleware>
|
||||
);
|
||||
@@ -17,6 +15,7 @@ export async function getServerSideProps({req, locale}) {
|
||||
return {
|
||||
props: {
|
||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||
title: "Dashboard.dashboard_page",
|
||||
isBot,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import DashboardMachinaryOfficeComponent from "@/components/dashboard/machinary-office";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import RolePermission from "@/middlewares/RolePermission";
|
||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||
import {parse} from "next-useragent";
|
||||
@@ -9,7 +8,6 @@ export default function PassengerOffice() {
|
||||
return (
|
||||
<WithAuthMiddleware>
|
||||
<RolePermission requiredPermissions={requiredPermissions}>
|
||||
<TitlePage text="Dashboard.machinary_office_page"/>
|
||||
<DashboardMachinaryOfficeComponent/>
|
||||
</RolePermission>
|
||||
</WithAuthMiddleware>
|
||||
@@ -21,6 +19,7 @@ export async function getServerSideProps({req, locale}) {
|
||||
return {
|
||||
props: {
|
||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||
title: "Dashboard.machinary_office_page",
|
||||
isBot,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import DashboardPassengerBossComponent from "@/components/dashboard/passenger-boss";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import RolePermission from "@/middlewares/RolePermission";
|
||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||
import {parse} from "next-useragent";
|
||||
@@ -9,7 +8,6 @@ export default function PassengerBoss() {
|
||||
return (
|
||||
<WithAuthMiddleware>
|
||||
<RolePermission requiredPermissions={requiredPermissions}>
|
||||
<TitlePage text="Dashboard.passenger_boss_page"/>
|
||||
<DashboardPassengerBossComponent/>
|
||||
</RolePermission>
|
||||
</WithAuthMiddleware>
|
||||
@@ -21,6 +19,7 @@ export async function getServerSideProps({req, locale}) {
|
||||
return {
|
||||
props: {
|
||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||
title: "Dashboard.passenger_boss_page",
|
||||
isBot,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import DashboardPassengerOfficeComponent from "@/components/dashboard/passenger-office";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import RolePermission from "@/middlewares/RolePermission";
|
||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||
import {parse} from "next-useragent";
|
||||
@@ -9,7 +8,6 @@ export default function PassengerOffice() {
|
||||
return (
|
||||
<WithAuthMiddleware>
|
||||
<RolePermission requiredPermissions={requiredPermissions}>
|
||||
<TitlePage text="Dashboard.passenger_office_page"/>
|
||||
<DashboardPassengerOfficeComponent/>
|
||||
</RolePermission>
|
||||
</WithAuthMiddleware>
|
||||
@@ -21,6 +19,7 @@ export async function getServerSideProps({req, locale}) {
|
||||
return {
|
||||
props: {
|
||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||
title: "Dashboard.passenger_office_page",
|
||||
isBot,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import DashboardProvinceManagerComponent from "@/components/dashboard/province-manager";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import RolePermission from "@/middlewares/RolePermission";
|
||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||
import {parse} from "next-useragent";
|
||||
@@ -9,7 +8,6 @@ export default function PassengerOffice() {
|
||||
return (
|
||||
<WithAuthMiddleware>
|
||||
<RolePermission requiredPermissions={requiredPermissions}>
|
||||
<TitlePage text="Dashboard.province_manager_page"/>
|
||||
<DashboardProvinceManagerComponent/>
|
||||
</RolePermission>
|
||||
</WithAuthMiddleware>
|
||||
@@ -21,6 +19,7 @@ export async function getServerSideProps({req, locale}) {
|
||||
return {
|
||||
props: {
|
||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||
title: "Dashboard.province_manager_page",
|
||||
isBot,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import DashboardTransportationAssistanceComponent from "@/components/dashboard/transportation-assistance";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import RolePermission from "@/middlewares/RolePermission";
|
||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||
import {parse} from "next-useragent";
|
||||
@@ -9,7 +8,6 @@ export default function TransportationAssistance() {
|
||||
return (
|
||||
<WithAuthMiddleware>
|
||||
<RolePermission requiredPermissions={requiredPermissions}>
|
||||
<TitlePage text="Dashboard.transportation_assistance"/>
|
||||
<DashboardTransportationAssistanceComponent/>
|
||||
</RolePermission>
|
||||
</WithAuthMiddleware>
|
||||
@@ -21,6 +19,7 @@ export async function getServerSideProps({req, locale}) {
|
||||
return {
|
||||
props: {
|
||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||
title: "Dashboard.transportation_assistance",
|
||||
isBot,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import FirstComponent from "@/components/first";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import {parse} from "next-useragent";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<>
|
||||
<TitlePage text="first_page"/>
|
||||
<FirstComponent/>
|
||||
</>
|
||||
);
|
||||
@@ -16,6 +14,7 @@ export async function getServerSideProps({req, locale}) {
|
||||
return {
|
||||
props: {
|
||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||
title: "first_page",
|
||||
isBot,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import LoginComponent from "@/components/login-expert";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import WithoutAuthMiddleware from "@/middlewares/WithoutAuth";
|
||||
import {parse} from "next-useragent";
|
||||
import "react-toastify/dist/ReactToastify.css";
|
||||
@@ -10,7 +9,6 @@ export default function Login() {
|
||||
const {directionApp} = useDirection();
|
||||
return (
|
||||
<WithoutAuthMiddleware>
|
||||
<TitlePage text="Titles.title_login_expert_page"/>
|
||||
<LoginComponent/>
|
||||
{directionApp === "rtl" ? <ToastContainer rtl/> : <ToastContainer ltr/>}
|
||||
</WithoutAuthMiddleware>
|
||||
@@ -22,6 +20,7 @@ export async function getServerSideProps({req, locale}) {
|
||||
return {
|
||||
props: {
|
||||
messages: (await import(`&/locales/${locale}/app.json`)).default,
|
||||
title: "Titles.title_login_expert_page",
|
||||
isBot,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user