diff --git a/src/main.tsx b/src/main.tsx index ba6f26b..fa50f1b 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,14 +1,26 @@ -import React from 'react'; +import React, { useLayoutEffect } from 'react'; import ReactDOM from 'react-dom/client'; import { BrowserRouter } from 'react-router-dom'; import BaseLayout from '@/layouts/base'; import './index.css'; -ReactDOM.createRoot(document.getElementById('root')!).render( - +// eslint-disable-next-line react-refresh/only-export-components +function App() { + useLayoutEffect(() => { + if (window.location.pathname === '/') { + window.location.href = '/gpthub/'; + } + }, []) + return ( + ) +} + +ReactDOM.createRoot(document.getElementById('root')!).render( + + , )