authorization of users
This commit is contained in:
@@ -28,7 +28,7 @@ const LoadingHardPage = ({ children, loading }) => {
|
||||
>
|
||||
<Fade in={true}>
|
||||
<LoadingImage
|
||||
src={"/images/logo.svg"}
|
||||
src={"/images/loading.svg"}
|
||||
alt="loading marhaba"
|
||||
priority
|
||||
width={100}
|
||||
|
||||
@@ -7,7 +7,7 @@ const Message = ({ text, actions }) => {
|
||||
<FullPageLayout sx={{ p: 1 }}>
|
||||
<CenterLayout spacing={3}>
|
||||
<StyledImage
|
||||
src={"/images/logo.svg"}
|
||||
src={"/images/loading.svg"}
|
||||
alt="loading loan facilities"
|
||||
width={100}
|
||||
height={100}
|
||||
|
||||
@@ -4,6 +4,6 @@ export const LOGIN_SEND_OTP_TOKEN = BASE_URL + "/login/send_otp";
|
||||
export const LOGIN = BASE_URL + "/login";
|
||||
export const REGISTER_SEND_OTP_TOKEN = BASE_URL + "/register/send_otp";
|
||||
export const REGISTER = BASE_URL + "/register";
|
||||
export const USER_INFO = BASE_URL + "/hamidGiveme";
|
||||
export const USER_INFO = BASE_URL + "/profile/info";
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ const WithAuthMiddleware = ({ children }) => {
|
||||
text={
|
||||
<Typography sx={{ textAlign: "center" }}>
|
||||
{t(
|
||||
"typography_your_access_to_this_page_has_expired_Please_login_again"
|
||||
"Authorization.typography_your_access_to_this_page_has_expired_Please_login_again"
|
||||
)}
|
||||
</Typography>
|
||||
}
|
||||
@@ -26,8 +26,7 @@ const WithAuthMiddleware = ({ children }) => {
|
||||
variant="contained"
|
||||
component={NextLinkComposed}
|
||||
to={{
|
||||
pathname: "/login",
|
||||
query: { back_url: encodeURIComponent(router.asPath) },
|
||||
pathname: "/",
|
||||
}}
|
||||
>
|
||||
{t("login")}
|
||||
|
||||
@@ -37,14 +37,14 @@ const WithoutAuthMiddleware = ({ children }) => {
|
||||
<Stack alignItems="center" spacing={2}>
|
||||
<Typography sx={{ textAlign: "center" }}>
|
||||
{t(
|
||||
"typography_your_login_is_valid_and_you_do_not_need_to_login_again"
|
||||
"Authorization.typography_your_login_is_valid_and_you_do_not_need_to_login_again"
|
||||
)}
|
||||
</Typography>
|
||||
<Typography>
|
||||
{t("typography_redirect_to")}{" "}
|
||||
{t("Authorization.typography_redirect_to")}{" "}
|
||||
{backUrlDecodedPath
|
||||
? t("typography_routing_previuos_page")
|
||||
: t("typography_routing_dashbaord_page")}
|
||||
? t("Authorization.typography_routing_previuos_page")
|
||||
: t("Authorization.typography_routing_dashbaord_page")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import DashboardFirstComponent from "@/components/dashboard/first";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import WithAuthMiddleware from "@/middlewares/WithoutAuth";
|
||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||
import { parse } from "next-useragent";
|
||||
|
||||
export default function Dashboard() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import DashboardLoanFollowUpComponent from "@/components/dashboard/loan-follow-up";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import WithAuthMiddleware from "@/middlewares/WithoutAuth";
|
||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||
import { parse } from "next-useragent";
|
||||
|
||||
export default function LoanFollowUp() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import DashboardLoanRequestComponent from "@/components/dashboard/loan-request";
|
||||
import TitlePage from "@/core/components/TitlePage";
|
||||
import WithAuthMiddleware from "@/middlewares/WithoutAuth";
|
||||
import WithAuthMiddleware from "@/middlewares/WithAuth";
|
||||
import { parse } from "next-useragent";
|
||||
|
||||
export default function LoanRequest() {
|
||||
|
||||
Reference in New Issue
Block a user