Added page and endpoints for managing Tags
This commit is contained in:
@ -1,22 +1,23 @@
|
||||
import React from "react";
|
||||
import { Routes, Route } from 'react-router-dom';
|
||||
import { Footer, Header, ProtectedRoute } from './components';
|
||||
import { BaseLayout, HomeView, RedirectView, BookmarksListView, BookmarkDetailView, TestView, NotFoundView } from './views';
|
||||
import { BaseLayout, HomeView, RedirectView, BookmarksListView, BookmarkDetailView, TestView, NotFoundView, TagsView } from './views';
|
||||
import { isDev } from "./utils";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="App" style={{minHeight: '100vh', display: 'flex', flexDirection: 'column'}}>
|
||||
<Routes>
|
||||
|
||||
<Route
|
||||
path="/"
|
||||
element={<BaseLayout header={ <Header />} content={ <HomeView /> } footer={ <Footer />}/>}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path="/redirect"
|
||||
element={<BaseLayout header={ <Header />} content={ <RedirectView />} footer={ <Footer />}/> }
|
||||
/>
|
||||
|
||||
<Route
|
||||
path="/bookmarks"
|
||||
element={
|
||||
@ -29,6 +30,7 @@ function App() {
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path="/bookmarks/hidden"
|
||||
element={
|
||||
@ -41,6 +43,7 @@ function App() {
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path="/bookmarks/new"
|
||||
element={
|
||||
@ -52,6 +55,7 @@ function App() {
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path="/bookmarks/:id"
|
||||
element={
|
||||
@ -63,16 +67,30 @@ function App() {
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path="/404"
|
||||
element={<BaseLayout content={<NotFoundView />} />}
|
||||
/>
|
||||
|
||||
{ isDev() && (
|
||||
<Route
|
||||
path="/test"
|
||||
element={<BaseLayout header={ <Header />} content={ <TestView /> } footer={ <Footer />}/>}
|
||||
/>
|
||||
)}
|
||||
|
||||
<Route
|
||||
path="/tags"
|
||||
element={
|
||||
<ProtectedRoute
|
||||
layout={BaseLayout}
|
||||
header={Header}
|
||||
footer={Footer}
|
||||
view={TagsView}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</Routes>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user