Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b2e0a6857 | |||
| 724e846826 |
@@ -2,12 +2,17 @@ import {useIntl} from 'react-intl'
|
|||||||
import {MenuItem} from './MenuItem'
|
import {MenuItem} from './MenuItem'
|
||||||
import {MenuInnerWithSub} from './MenuInnerWithSub'
|
import {MenuInnerWithSub} from './MenuInnerWithSub'
|
||||||
import {MegaMenu} from './MegaMenu'
|
import {MegaMenu} from './MegaMenu'
|
||||||
|
import { useLocation } from 'react-router-dom'
|
||||||
|
|
||||||
export function MenuInner() {
|
export function MenuInner() {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
|
const {pathname} = useLocation()
|
||||||
|
const isHelpPath = pathname == '/help'
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<MenuItem title={intl.formatMessage({id: 'MENU.DASHBOARD'})} to='/dashboard' />
|
{/* <MenuItem title={intl.formatMessage({id: 'MENU.DASHBOARD'})} to='/dashboard' /> */}
|
||||||
|
<MenuItem title={`${isHelpPath ? 'Help' : 'Dashboard'}`} to={`${isHelpPath ? '/help' : '/dashboard'}`} />
|
||||||
|
|
||||||
{/* <MenuItem title='Layout Builder' to='/builder' /> */}
|
{/* <MenuItem title='Layout Builder' to='/builder' /> */}
|
||||||
<MenuInnerWithSub
|
<MenuInnerWithSub
|
||||||
title='Crafted'
|
title='Crafted'
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
|
import { Content } from "../../../_digifi/layout/components/content";
|
||||||
|
|
||||||
export default function HelpPage() {
|
export default function HelpPage() {
|
||||||
return (
|
return (
|
||||||
<div className="w-100 h-100">
|
<Content>
|
||||||
<h1 className="fs-2hx fw-bold text-gray-800">Help</h1>
|
<div className="w-100 h-100">
|
||||||
</div>
|
<h1 className="fs-2hx fw-bold text-gray-800">Help</h1>
|
||||||
|
</div>
|
||||||
|
</Content>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import {PrivateRoutes} from './PrivateRoutes'
|
|||||||
import {ErrorsPage} from '../modules/errors/ErrorsPage'
|
import {ErrorsPage} from '../modules/errors/ErrorsPage'
|
||||||
import {Logout, AuthPage, useAuth} from '../modules/auth'
|
import {Logout, AuthPage, useAuth} from '../modules/auth'
|
||||||
import {App} from '../App'
|
import {App} from '../App'
|
||||||
import HelpPage from '../modules/help/HelpPage'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base URL of the website.
|
* Base URL of the website.
|
||||||
@@ -27,7 +26,6 @@ const AppRoutes: FC = () => {
|
|||||||
<Routes>
|
<Routes>
|
||||||
<Route element={<App />}>
|
<Route element={<App />}>
|
||||||
<Route path='error/*' element={<ErrorsPage />} />
|
<Route path='error/*' element={<ErrorsPage />} />
|
||||||
<Route path='/help' element={<HelpPage />} />
|
|
||||||
<Route path='logout' element={<Logout />} />
|
<Route path='logout' element={<Logout />} />
|
||||||
{currentUser ? (
|
{currentUser ? (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { DashboardWrapper } from "../pages/dashboard/DashboardWrapper";
|
|||||||
// import {MenuTestPage} from '../pages/MenuTestPage'
|
// import {MenuTestPage} from '../pages/MenuTestPage'
|
||||||
import { getCSSVariableValue } from "../../_digifi/assets/ts/_utils";
|
import { getCSSVariableValue } from "../../_digifi/assets/ts/_utils";
|
||||||
import { WithChildren } from "../../_digifi/helpers";
|
import { WithChildren } from "../../_digifi/helpers";
|
||||||
|
import HelpPage from "../modules/help/HelpPage";
|
||||||
// import BuilderPageWrapper from '../pages/layout-builder/BuilderPageWrapper'
|
// import BuilderPageWrapper from '../pages/layout-builder/BuilderPageWrapper'
|
||||||
|
|
||||||
const PrivateRoutes = () => {
|
const PrivateRoutes = () => {
|
||||||
@@ -98,6 +99,7 @@ const PrivateRoutes = () => {
|
|||||||
</SuspensedView>
|
</SuspensedView>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<Route path='/help' element={<HelpPage />} />
|
||||||
{/* Page Not Found */}
|
{/* Page Not Found */}
|
||||||
<Route path="*" element={<Navigate to="/error/404" />} />
|
<Route path="*" element={<Navigate to="/error/404" />} />
|
||||||
</Route>
|
</Route>
|
||||||
|
|||||||
Reference in New Issue
Block a user