feat core react: remove routes stuff for components for now

This commit is contained in:
prplwtf 2024-01-06 23:37:19 +01:00
parent 2b649f9f74
commit 12e6e5bb7a
7 changed files with 6 additions and 79 deletions

View file

@ -644,10 +644,6 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then VCMD="y"
PLACE_REACT "$Components_Navigation_SubNavigation_AdditionalServerItems" "Navigation/SubNavigation/AdditionalServerItems.tsx" "$OldComponents_Navigation_SubNavigation_AdditionalServerItems" PLACE_REACT "$Components_Navigation_SubNavigation_AdditionalServerItems" "Navigation/SubNavigation/AdditionalServerItems.tsx" "$OldComponents_Navigation_SubNavigation_AdditionalServerItems"
PLACE_REACT "$Components_Navigation_SubNavigation_AdditionalAccountItems" "Navigation/SubNavigation/AdditionalAccountItems.tsx" "$OldComponents_Navigation_SubNavigation_AdditionalAccountItems" PLACE_REACT "$Components_Navigation_SubNavigation_AdditionalAccountItems" "Navigation/SubNavigation/AdditionalAccountItems.tsx" "$OldComponents_Navigation_SubNavigation_AdditionalAccountItems"
PLACE_REACT "$Components_Navigation_SubNavigation_AfterSubNavigation" "Navigation/SubNavigation/AfterSubNavigation.tsx" "$OldComponents_Navigation_SubNavigation_AfterSubNavigation" PLACE_REACT "$Components_Navigation_SubNavigation_AfterSubNavigation" "Navigation/SubNavigation/AfterSubNavigation.tsx" "$OldComponents_Navigation_SubNavigation_AfterSubNavigation"
PLACE_REACT "$Components_Navigation_Routes_AdditionalDashboardRoutes" "Navigation/Routes/AdditionalDashboardRoutes.tsx" "$OldComponents_Navigation_Routes_AdditionalDashboardRoutes"
PLACE_REACT "$Components_Navigation_Routes_AdditionalServerRoutes" "Navigation/Routes/AdditionalServerRoutes.tsx" "$OldComponents_Navigation_Routes_AdditionalServerRoutes"
PLACE_REACT "$Components_Navigation_Routes_AdditionalGuestRoutes" "Navigation/Routes/AdditionalGuestRoutes.tsx" "$OldComponents_Navigation_Routes_AdditionalGuestRoutes"
# dashboard # dashboard
PLACE_REACT "$Components_Dashboard_ServerRow_BeforeEntryName" "Dashboard/ServerRow/BeforeEntryName.tsx" "$OldComponents_Dashboard_ServerRow_BeforeEntryName" PLACE_REACT "$Components_Dashboard_ServerRow_BeforeEntryName" "Dashboard/ServerRow/BeforeEntryName.tsx" "$OldComponents_Dashboard_ServerRow_BeforeEntryName"
@ -1123,9 +1119,6 @@ if [[ ( $2 == "-r" ) || ( $2 == "-remove" ) ]]; then VCMD="y"
REMOVE_REACT "$Components_Navigation_SubNavigation_AdditionalServerItems" "Navigation/SubNavigation/AdditionalServerItems.tsx" REMOVE_REACT "$Components_Navigation_SubNavigation_AdditionalServerItems" "Navigation/SubNavigation/AdditionalServerItems.tsx"
REMOVE_REACT "$Components_Navigation_SubNavigation_AdditionalAccountItems" "Navigation/SubNavigation/AdditionalAccountItems.tsx" REMOVE_REACT "$Components_Navigation_SubNavigation_AdditionalAccountItems" "Navigation/SubNavigation/AdditionalAccountItems.tsx"
REMOVE_REACT "$Components_Navigation_SubNavigation_AfterSubNavigation" "Navigation/SubNavigation/AfterSubNavigation.tsx" REMOVE_REACT "$Components_Navigation_SubNavigation_AfterSubNavigation" "Navigation/SubNavigation/AfterSubNavigation.tsx"
REMOVE_REACT "$Components_Navigation_Routes_AdditionalDashboardRoutes" "Navigation/Routes/AdditionalDashboardRoutes.tsx"
REMOVE_REACT "$Components_Navigation_Routes_AdditionalServerRoutes" "Navigation/Routes/AdditionalServerRoutes.tsx"
REMOVE_REACT "$Components_Navigation_Routes_AdditionalGuestRoutes" "Navigation/Routes/AdditionalGuestRoutes.tsx"
# dashboard # dashboard

View file

@ -1,10 +0,0 @@
import React from 'react';
/* blueprint/import */
export default () => {
return (
<>
{/* blueprint/react */}
</>
);
};

View file

@ -1,10 +0,0 @@
import React from 'react';
/* blueprint/import */
export default () => {
return (
<>
{/* blueprint/react */}
</>
);
};

View file

@ -1,10 +0,0 @@
import React from 'react';
/* blueprint/import */
export default () => {
return (
<>
{/* blueprint/react */}
</>
);
};

View file

@ -1,32 +0,0 @@
import React from 'react';
import { Route, Switch, useRouteMatch } from 'react-router-dom';
import LoginContainer from '@/components/auth/LoginContainer';
import ForgotPasswordContainer from '@/components/auth/ForgotPasswordContainer';
import ResetPasswordContainer from '@/components/auth/ResetPasswordContainer';
import LoginCheckpointContainer from '@/components/auth/LoginCheckpointContainer';
import { NotFound } from '@/components/elements/ScreenBlock';
import { useHistory, useLocation } from 'react-router';
import AdditionalGuestRoutes from '@/blueprint/components/Navigation/Routes/AdditionalGuestRoutes';
export default () => {
const history = useHistory();
const location = useLocation();
const { path } = useRouteMatch();
return (
<div className={'pt-8 xl:pt-32'}>
<Switch location={location}>
<Route path={`${path}/login`} component={LoginContainer} exact />
<Route path={`${path}/login/checkpoint`} component={LoginCheckpointContainer} />
<Route path={`${path}/password`} component={ForgotPasswordContainer} exact />
<Route path={`${path}/password/reset/:token`} component={ResetPasswordContainer} />
<Route path={`${path}/checkpoint`} />
<AdditionalGuestRoutes />
<Route path={'*'}>
<NotFound onBack={() => history.push('/auth/login')} />
</Route>
</Switch>
</div>
);
};

View file

@ -12,7 +12,6 @@ import routes from '@/routers/routes';
import BeforeSubNavigation from '@/blueprint/components/Navigation/SubNavigation/BeforeSubNavigation'; import BeforeSubNavigation from '@/blueprint/components/Navigation/SubNavigation/BeforeSubNavigation';
import AdditionalAccountItems from '@/blueprint/components/Navigation/SubNavigation/AdditionalAccountItems'; import AdditionalAccountItems from '@/blueprint/components/Navigation/SubNavigation/AdditionalAccountItems';
import AfterSubNavigation from '@/blueprint/components/Navigation/SubNavigation/AfterSubNavigation'; import AfterSubNavigation from '@/blueprint/components/Navigation/SubNavigation/AfterSubNavigation';
import AdditionalDashboardRoutes from '@/blueprint/components/Navigation/Routes/AdditionalDashboardRoutes';
export default () => { export default () => {
const location = useLocation(); const location = useLocation();
@ -47,7 +46,6 @@ export default () => {
<Component /> <Component />
</Route> </Route>
))} ))}
<AdditionalDashboardRoutes />
<Route path={'*'}> <Route path={'*'}>
<NotFound /> <NotFound />
</Route> </Route>

View file

@ -24,7 +24,6 @@ import routes from '@/routers/routes';
import BeforeSubNavigation from '@/blueprint/components/Navigation/SubNavigation/BeforeSubNavigation'; import BeforeSubNavigation from '@/blueprint/components/Navigation/SubNavigation/BeforeSubNavigation';
import AdditionalServerItems from '@/blueprint/components/Navigation/SubNavigation/AdditionalServerItems'; import AdditionalServerItems from '@/blueprint/components/Navigation/SubNavigation/AdditionalServerItems';
import AfterSubNavigation from '@/blueprint/components/Navigation/SubNavigation/AfterSubNavigation'; import AfterSubNavigation from '@/blueprint/components/Navigation/SubNavigation/AfterSubNavigation';
import AdditionalServerRoutes from '@/blueprint/components/Navigation/Routes/AdditionalServerRoutes';
export default () => { export default () => {
const match = useRouteMatch<{ id: string }>(); const match = useRouteMatch<{ id: string }>();
@ -124,7 +123,6 @@ export default () => {
</Spinner.Suspense> </Spinner.Suspense>
</PermissionRoute> </PermissionRoute>
))} ))}
<AdditionalServerRoutes />
<Route path={'*'} component={NotFound} /> <Route path={'*'} component={NotFound} />
</Switch> </Switch>
</TransitionRouter> </TransitionRouter>