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.
72 lines
1.7 KiB
72 lines
1.7 KiB
import Home from '../pages/Home.jsx'
|
|
import Login from '../pages/Login.jsx'
|
|
import Register from '../pages/Register.jsx'
|
|
import Video from '../pages/Video.jsx'
|
|
import ProtectedRoute from '../components/ProtectedRoute.jsx'
|
|
import Account from "../pages/Account.jsx";
|
|
import ManageChannel from "../pages/ManageChannel.jsx";
|
|
import ManageVideo from "../pages/ManageVideo.jsx";
|
|
import AddVideo from "../pages/AddVideo.jsx";
|
|
import Search from "../pages/Search.jsx";
|
|
|
|
const routes = [
|
|
{ path: "/", element: <Home/> },
|
|
{
|
|
path: "/login",
|
|
element: (
|
|
<ProtectedRoute requireAuth={false}>
|
|
<Login />
|
|
</ProtectedRoute>
|
|
)
|
|
},
|
|
{
|
|
path: "/register",
|
|
element: (
|
|
<ProtectedRoute requireAuth={false}>
|
|
<Register />
|
|
</ProtectedRoute>
|
|
)
|
|
},
|
|
{
|
|
path: "/video/:id",
|
|
element: <Video />
|
|
},
|
|
{
|
|
path: "/profile",
|
|
element: (
|
|
<ProtectedRoute requireAuth={true}>
|
|
<Account/>
|
|
</ProtectedRoute>
|
|
)
|
|
},
|
|
{
|
|
path: "/manage-channel/:id",
|
|
element: (
|
|
<ProtectedRoute requireAuth={true}>
|
|
<ManageChannel/>
|
|
</ProtectedRoute>
|
|
)
|
|
},
|
|
{
|
|
path: "/manage-video/:id",
|
|
element: (
|
|
<ProtectedRoute requireAuth={true}>
|
|
<ManageVideo/>
|
|
</ProtectedRoute>
|
|
)
|
|
},
|
|
{
|
|
path: "/add-video",
|
|
element: (
|
|
<ProtectedRoute requireAuth={true}>
|
|
<AddVideo/>
|
|
</ProtectedRoute>
|
|
)
|
|
},
|
|
{
|
|
path: "/search",
|
|
element: <Search />
|
|
}
|
|
]
|
|
|
|
export default routes;
|