Skip to content

Commit

Permalink
chore: path
Browse files Browse the repository at this point in the history
  • Loading branch information
lencx committed Nov 13, 2023
1 parent 31be9ea commit 27f398b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
import React, { useLayoutEffect } from 'react';
import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';

import BaseLayout from '@/layouts/base';
import './index.css';

// eslint-disable-next-line react-refresh/only-export-components
function App() {
useLayoutEffect(() => {
if (window.location.pathname === '/') {
window.location.href = '/gpthub/';
}
}, [])
return (
<BrowserRouter basename="/gpthub">
<BrowserRouter>
<BaseLayout />
</BrowserRouter>
)
Expand Down

0 comments on commit 27f398b

Please sign in to comment.