mirror of
https://github.com/balzack/databag.git
synced 2025-04-22 01:25:17 +00:00
using hash router for web
This commit is contained in:
parent
d575368ba1
commit
dce3161ae3
@ -7,7 +7,7 @@ import { createTheme, MantineProvider, virtualColor } from '@mantine/core'
|
||||
import { ModalsProvider } from '@mantine/modals'
|
||||
import './App.css'
|
||||
import '@mantine/core/styles.css'
|
||||
import { createBrowserRouter, RouterProvider } from 'react-router-dom'
|
||||
import { createHashRouter, RouterProvider } from 'react-router-dom'
|
||||
import classes from './App.module.css'
|
||||
import { DisplayContext } from './context/DisplayContext'
|
||||
import { ContextType } from './context/ContextType'
|
||||
@ -147,7 +147,7 @@ const theme = createTheme({
|
||||
},
|
||||
})
|
||||
|
||||
const router = createBrowserRouter([
|
||||
const router = createHashRouter([
|
||||
{
|
||||
element: <Root />,
|
||||
children: [
|
||||
|
@ -45,7 +45,7 @@ export function useAccess() {
|
||||
}
|
||||
|
||||
const { protocol, host } = location
|
||||
updateState({ host, secure: protocol === 'https' })
|
||||
updateState({ host, secure: protocol === 'https:' })
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -195,6 +195,13 @@ var endpoints = routes{
|
||||
SetAccountSeal,
|
||||
},
|
||||
|
||||
route{
|
||||
"ClearAccountSeal",
|
||||
strings.ToUpper("Delete"),
|
||||
"/account/seal",
|
||||
ClearAccountSeal,
|
||||
},
|
||||
|
||||
route{
|
||||
"SetAccountSerchable",
|
||||
strings.ToUpper("Put"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user