account export
parent
7e3796ca0e
commit
54fd54a6c7
|
@ -132,10 +132,6 @@ export function App() {
|
|||
options={{
|
||||
username: appUserData.user.username,
|
||||
permissions: appUserData.permissions,
|
||||
accountPlanExpiry:
|
||||
appUserData.user.account_plan_expiry === null
|
||||
? undefined
|
||||
: appUserData.user.account_plan_expiry,
|
||||
}}
|
||||
>
|
||||
<UserProfileProvider>
|
||||
|
|
|
@ -26,7 +26,6 @@ const StoreCalendarAuth = lazy(() => import("../../Pages/Store/Calendar/Auth"));
|
|||
//const Support = lazy(() => import("../../Pages/Support"));
|
||||
//const Feedback = lazy(() => import("../../Pages/Feedback"));
|
||||
const UserProfile = lazy(() => import("../../Pages/UserProfile"));
|
||||
const RedirectToDemo = lazy(() => import("../../Pages/RedirectToDemo"));
|
||||
|
||||
export function AuthenticationRoutes() {
|
||||
return (
|
||||
|
@ -85,15 +84,6 @@ export function AuthenticationRoutes() {
|
|||
}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path={Constants.ROUTE_PATHS.DEMO}
|
||||
element={
|
||||
<MySupsenseFallback>
|
||||
<RedirectToDemo />
|
||||
</MySupsenseFallback>
|
||||
}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path="*"
|
||||
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,
|
||||
Col,
|
||||
Form,
|
||||
Input,
|
||||
Popconfirm,
|
||||
Radio,
|
||||
Row,
|
||||
|
@ -24,6 +23,7 @@ import {
|
|||
myFetch,
|
||||
showInputsInvalidNotification,
|
||||
showPasswordIncorrectNotification,
|
||||
showUnkownErrorNotification,
|
||||
} from "../../utils";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
|
@ -778,7 +778,10 @@ function YourAccountExportDataCard({ notificationApi }) {
|
|||
|
||||
if (errStatus === 400) {
|
||||
showPasswordIncorrectNotification(notificationApi, t);
|
||||
return;
|
||||
}
|
||||
|
||||
showUnkownErrorNotification(notificationApi, t);
|
||||
});
|
||||
})
|
||||
.catch(() => showInputsInvalidNotification(notificationApi, t));
|
||||
|
@ -792,7 +795,7 @@ function YourAccountExportDataCard({ notificationApi }) {
|
|||
{t("userProfile.accountExport.modal.info")}
|
||||
</Typography.Paragraph>
|
||||
|
||||
<MyEmailFormInput />
|
||||
<MyEmailFormInput disableEmailCheck />
|
||||
|
||||
<MyPasswordFormInput />
|
||||
</Form>
|
||||
|
|
Loading…
Reference in New Issue