Big progress!
This commit is contained in:
@@ -16,9 +16,9 @@ export function LandingPage({ currentUser }) {
|
||||
|
||||
useEffect(() => {
|
||||
if (!currentUser.authorized) {
|
||||
navigate('/manage');
|
||||
navigate('/manage/');
|
||||
}
|
||||
}, [currentUser, navigate]);
|
||||
|
||||
return currentUser.authorized ? <LandingPageStatic /> : <div />;
|
||||
return <LandingPageStatic /> ;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ export default function ManageRootPageComponent() {
|
||||
navigate('/manage/jobs');
|
||||
}, [navigate]);
|
||||
|
||||
return <div />;
|
||||
return <div />;
|
||||
// return (
|
||||
// <div>
|
||||
// <DashboardGridComponent />
|
||||
|
||||
@@ -3,7 +3,7 @@ import preval from "preval.macro";
|
||||
import React, {lazy, Suspense, useEffect} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
import {Link, Route, Routes, useLocation, useParams} from "react-router-dom";
|
||||
import {Link, Route, Routes} from "react-router-dom";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import BreadCrumbs from "../../components/breadcrumbs/breadcrumbs.component";
|
||||
import ChatAffixContainer from "../../components/chat-affix/chat-affix.container";
|
||||
@@ -24,9 +24,6 @@ import * as Sentry from "@sentry/react";
|
||||
import "./manage.page.styles.scss";
|
||||
import UpdateAlert from "../../components/update-alert/update-alert.component";
|
||||
|
||||
const ManageRootPage = lazy(() =>
|
||||
import("../manage-root/manage-root.page.container")
|
||||
);
|
||||
const JobsPage = lazy(() => import("../jobs/jobs.page"));
|
||||
|
||||
const CardPaymentModalContainer = lazy(() =>
|
||||
@@ -176,21 +173,14 @@ const mapStateToProps = createStructuredSelector({
|
||||
});
|
||||
|
||||
export function Manage({conflict, bodyshop}) {
|
||||
|
||||
const location = useLocation();
|
||||
const params = useParams();
|
||||
const currentPath = location.pathname
|
||||
console.dir(currentPath)
|
||||
const {t} = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
const widgetId = "IABVNO4scRKY11XBQkNr";
|
||||
window.noticeable.render("widget", widgetId);
|
||||
try {
|
||||
requestForToken();
|
||||
} catch (error) {
|
||||
console.log("Unable to request for token.", error);
|
||||
}
|
||||
requestForToken().catch((error) => {
|
||||
console.error(`Unable to request for token.`, error)
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -198,7 +188,7 @@ export function Manage({conflict, bodyshop}) {
|
||||
}, [t]);
|
||||
const AppRouteTable = (
|
||||
<Suspense
|
||||
fallback={<LoadingSpinner message={t("general.labels.loadingapp")}/>}This
|
||||
fallback={<LoadingSpinner message={t("general.labels.loadingapp")}/>} This
|
||||
>
|
||||
<PaymentModalContainer/>
|
||||
|
||||
@@ -213,7 +203,6 @@ export function Manage({conflict, bodyshop}) {
|
||||
<PrintCenterModalContainer/>
|
||||
<Routes>
|
||||
<Route path='/_test' element={<TestComponent/>}/>
|
||||
<Route path='/' element={<ManageRootPage/>}/>
|
||||
<Route path='/jobs' element={<JobsPage/>}/>
|
||||
<Route
|
||||
path='/jobs/:jobId/intake'
|
||||
@@ -305,7 +294,7 @@ export function Manage({conflict, bodyshop}) {
|
||||
<Route path='/shop' element={<ShopPage/>}/>
|
||||
{
|
||||
// <Route
|
||||
// path={`${currentPath}/shop/templates`}
|
||||
// path='/shop/templates'
|
||||
// element={<ShopTemplates />}
|
||||
// />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user