You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1001 B
46 lines
1001 B
3 years ago
|
import React from "react";
|
||
|
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
||
|
|
||
|
import _ from "lodash";
|
||
|
import Home from './Views/Home';
|
||
|
// import VideoTube from "./views/Home/VideoTube";
|
||
|
|
||
|
function Router({ isDark }) {
|
||
|
return (
|
||
|
<div className={_.join([isDark ? "dark" : ""], " ")}>
|
||
|
<div
|
||
|
className={_.join(
|
||
|
[
|
||
|
"min-h-screen min-w-screen rtl overflow-x-hidden",
|
||
|
isDark ? "bg-dark" : "bg-white",
|
||
|
],
|
||
|
" "
|
||
|
)}
|
||
|
>
|
||
|
<BrowserRouter>
|
||
|
<Routes>
|
||
|
<Route path="/" element={<Home />} />
|
||
|
{/* <Route path="/vod" element={<VideoTube />} /> */}
|
||
|
<Route
|
||
|
path="*"
|
||
|
element={
|
||
|
<main>
|
||
|
<h1>No matches routes.</h1>
|
||
|
</main>
|
||
|
}
|
||
|
/>
|
||
|
</Routes>
|
||
|
</BrowserRouter>
|
||
|
</div>
|
||
|
</div>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
Router.defaultProps = {
|
||
|
isDark : false,
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
export default Router;
|