mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
fix(console): fix react data router (#3737)
This commit is contained in:
parent
b204cf828d
commit
5ef299866d
1 changed files with 17 additions and 12 deletions
|
@ -1,3 +1,4 @@
|
|||
import { useMemo } from 'react';
|
||||
import {
|
||||
Route,
|
||||
RouterProvider,
|
||||
|
@ -19,18 +20,22 @@ import HandleSocialCallback from '../Profile/containers/HandleSocialCallback';
|
|||
|
||||
function Main() {
|
||||
const swrOptions = useSwrOptions();
|
||||
const router = createBrowserRouter(
|
||||
createRoutesFromElements(
|
||||
<>
|
||||
<Route path="callback" element={<Callback />} />
|
||||
<Route path="welcome" element={<Welcome />} />
|
||||
<Route path="handle-social" element={<HandleSocialCallback />} />
|
||||
<Route element={<AppContent />}>
|
||||
<Route path="/*" element={<ConsoleContent />} />
|
||||
</Route>
|
||||
</>
|
||||
),
|
||||
{ basename: getBasename() }
|
||||
const router = useMemo(
|
||||
() =>
|
||||
createBrowserRouter(
|
||||
createRoutesFromElements(
|
||||
<>
|
||||
<Route path="callback" element={<Callback />} />
|
||||
<Route path="welcome" element={<Welcome />} />
|
||||
<Route path="handle-social" element={<HandleSocialCallback />} />
|
||||
<Route element={<AppContent />}>
|
||||
<Route path="/*" element={<ConsoleContent />} />
|
||||
</Route>
|
||||
</>
|
||||
),
|
||||
{ basename: getBasename() }
|
||||
),
|
||||
[]
|
||||
);
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Reference in a new issue