account export
parent
7e3796ca0e
commit
54fd54a6c7
|
@ -132,10 +132,6 @@ export function App() {
|
||||||
options={{
|
options={{
|
||||||
username: appUserData.user.username,
|
username: appUserData.user.username,
|
||||||
permissions: appUserData.permissions,
|
permissions: appUserData.permissions,
|
||||||
accountPlanExpiry:
|
|
||||||
appUserData.user.account_plan_expiry === null
|
|
||||||
? undefined
|
|
||||||
: appUserData.user.account_plan_expiry,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<UserProfileProvider>
|
<UserProfileProvider>
|
||||||
|
|
|
@ -26,7 +26,6 @@ const StoreCalendarAuth = lazy(() => import("../../Pages/Store/Calendar/Auth"));
|
||||||
//const Support = lazy(() => import("../../Pages/Support"));
|
//const Support = lazy(() => import("../../Pages/Support"));
|
||||||
//const Feedback = lazy(() => import("../../Pages/Feedback"));
|
//const Feedback = lazy(() => import("../../Pages/Feedback"));
|
||||||
const UserProfile = lazy(() => import("../../Pages/UserProfile"));
|
const UserProfile = lazy(() => import("../../Pages/UserProfile"));
|
||||||
const RedirectToDemo = lazy(() => import("../../Pages/RedirectToDemo"));
|
|
||||||
|
|
||||||
export function AuthenticationRoutes() {
|
export function AuthenticationRoutes() {
|
||||||
return (
|
return (
|
||||||
|
@ -85,15 +84,6 @@ export function AuthenticationRoutes() {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Route
|
|
||||||
path={Constants.ROUTE_PATHS.DEMO}
|
|
||||||
element={
|
|
||||||
<MySupsenseFallback>
|
|
||||||
<RedirectToDemo />
|
|
||||||
</MySupsenseFallback>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path="*"
|
path="*"
|
||||||
element={<Navigate to={Constants.ROUTE_PATHS.AUTHENTICATION.LOGIN} />}
|
element={<Navigate to={Constants.ROUTE_PATHS.AUTHENTICATION.LOGIN} />}
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
import { useEffect } from "react";
|
|
||||||
import MyCenteredSpin from "../../Components/MyCenteredSpin";
|
|
||||||
import {
|
|
||||||
myFetch,
|
|
||||||
setUserSessionToLocalStorage,
|
|
||||||
showUnkownErrorNotification,
|
|
||||||
} from "../../utils";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { notification } from "antd";
|
|
||||||
|
|
||||||
export default function RedirectToDemo() {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const [notificationApi, notificationContextHolder] =
|
|
||||||
notification.useNotification();
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
myFetch({
|
|
||||||
url: "/user/demo",
|
|
||||||
method: "GET",
|
|
||||||
})
|
|
||||||
.then((response) => {
|
|
||||||
setUserSessionToLocalStorage(response.XAuthorization);
|
|
||||||
window.location.href = "/";
|
|
||||||
})
|
|
||||||
.catch(() => showUnkownErrorNotification(notificationApi, t));
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{notificationContextHolder}
|
|
||||||
<MyCenteredSpin fullHeight />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -3,7 +3,6 @@ import {
|
||||||
Card,
|
Card,
|
||||||
Col,
|
Col,
|
||||||
Form,
|
Form,
|
||||||
Input,
|
|
||||||
Popconfirm,
|
Popconfirm,
|
||||||
Radio,
|
Radio,
|
||||||
Row,
|
Row,
|
||||||
|
@ -24,6 +23,7 @@ import {
|
||||||
myFetch,
|
myFetch,
|
||||||
showInputsInvalidNotification,
|
showInputsInvalidNotification,
|
||||||
showPasswordIncorrectNotification,
|
showPasswordIncorrectNotification,
|
||||||
|
showUnkownErrorNotification,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
|
@ -778,7 +778,10 @@ function YourAccountExportDataCard({ notificationApi }) {
|
||||||
|
|
||||||
if (errStatus === 400) {
|
if (errStatus === 400) {
|
||||||
showPasswordIncorrectNotification(notificationApi, t);
|
showPasswordIncorrectNotification(notificationApi, t);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showUnkownErrorNotification(notificationApi, t);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => showInputsInvalidNotification(notificationApi, t));
|
.catch(() => showInputsInvalidNotification(notificationApi, t));
|
||||||
|
@ -792,7 +795,7 @@ function YourAccountExportDataCard({ notificationApi }) {
|
||||||
{t("userProfile.accountExport.modal.info")}
|
{t("userProfile.accountExport.modal.info")}
|
||||||
</Typography.Paragraph>
|
</Typography.Paragraph>
|
||||||
|
|
||||||
<MyEmailFormInput />
|
<MyEmailFormInput disableEmailCheck />
|
||||||
|
|
||||||
<MyPasswordFormInput />
|
<MyPasswordFormInput />
|
||||||
</Form>
|
</Form>
|
||||||
|
|
Loading…
Reference in New Issue