-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(upgrade): react and react router & tailwind setup
- Loading branch information
Showing
21 changed files
with
2,767 additions
and
6,995 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
const tailwindcss = require('tailwindcss'); | ||
|
||
module.exports = { | ||
plugins: [tailwindcss('./tailwind.config.js', require('autoprefixer'))], | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
import React from 'react'; | ||
import Routers from './routes'; | ||
import './tailwind.css'; | ||
import Routers from './routes/Router'; | ||
import './App.css'; | ||
|
||
function App() { | ||
return ( | ||
<div className="w-full h-full"> | ||
<Routers /> | ||
</div> | ||
); | ||
} | ||
const App: React.FC = () => { | ||
return <Routers />; | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './App'; | ||
import './index.css'; | ||
import * as serviceWorker from './serviceWorker'; | ||
import { createRoot } from 'react-dom/client'; | ||
|
||
ReactDOM.render( | ||
const container = document.getElementById('root'); | ||
const root = createRoot(container!); | ||
|
||
root.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
document.getElementById('root') | ||
</React.StrictMode> | ||
); | ||
|
||
serviceWorker.unregister(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import React from 'react'; | ||
import { BrowserRouter, Route, Routes } from 'react-router-dom'; | ||
import GamingPageLayout from '../components/layouts/GamingPageLayout'; | ||
import HomePageLayout from '../components/layouts/HomePageLayout'; | ||
import MarketplacePageLayout from '../components/layouts/MarketplacePage'; | ||
import ProfilePageLayout from '../components/layouts/ProfilePageLayout'; | ||
import WatchPageLayout from '../components/layouts/WatchPageLayout'; | ||
import GamingPage from '../components/pages/gaming'; | ||
import HomePage from '../components/pages/home'; | ||
import LoginPage from '../components/pages/#'; | ||
import MarketplacePage from '../components/pages/marketplace'; | ||
import PageNotFound from '../components/pages/notfound'; | ||
import ProfilePage from '../components/pages/profile'; | ||
import RegisterPage from '../components/pages/#'; | ||
import WatchPage from '../components/pages/watch'; | ||
import { PrivateRoute } from './PrivateRoute'; | ||
import { | ||
GAMING, | ||
HOME, | ||
LOGIN, | ||
MARKETPLACE, | ||
PROFILE, | ||
REGISTER, | ||
WATCH, | ||
} from './routes'; | ||
|
||
const Routers: React.FC = () => { | ||
return ( | ||
<BrowserRouter> | ||
<Routes> | ||
<Route path={LOGIN} element={<LoginPage />} /> | ||
<Route path={REGISTER} element={<RegisterPage />} /> | ||
|
||
<Route | ||
path={HOME} | ||
element={ | ||
<PrivateRoute layout={HomePageLayout}> | ||
<HomePage /> | ||
</PrivateRoute> | ||
} | ||
/> | ||
|
||
<Route | ||
path={WATCH} | ||
element={ | ||
<PrivateRoute layout={WatchPageLayout}> | ||
<WatchPage /> | ||
</PrivateRoute> | ||
} | ||
/> | ||
|
||
<Route | ||
path={MARKETPLACE} | ||
element={ | ||
<PrivateRoute layout={MarketplacePageLayout}> | ||
<MarketplacePage /> | ||
</PrivateRoute> | ||
} | ||
/> | ||
|
||
<Route | ||
path={GAMING} | ||
element={ | ||
<PrivateRoute layout={GamingPageLayout}> | ||
<GamingPage /> | ||
</PrivateRoute> | ||
} | ||
/> | ||
|
||
<Route | ||
path={PROFILE} | ||
element={ | ||
<PrivateRoute layout={ProfilePageLayout}> | ||
<ProfilePage /> | ||
</PrivateRoute> | ||
} | ||
/> | ||
|
||
<Route path="*" element={<PageNotFound />} /> | ||
</Routes> | ||
</BrowserRouter> | ||
); | ||
}; | ||
|
||
export default Routers; |
Oops, something went wrong.