mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(app): add pending post view
This commit is contained in:
+25
-18
@@ -3,15 +3,16 @@ import { Outlet, Route, Routes, useLocation, useParams } from 'react-router-dom'
|
||||
import { isHomeView } from './lib/utils/view-utils';
|
||||
import useTheme from './hooks/use-theme';
|
||||
import styles from './app.module.css';
|
||||
import Board from './views/board';
|
||||
import Catalog from './views/catalog';
|
||||
import Home from './views/home';
|
||||
import PendingPost from './views/pending-post';
|
||||
import PostPage from './views/post-page';
|
||||
import Settings from './views/settings';
|
||||
import Board from './views/board';
|
||||
import BoardNav from './components/board-nav';
|
||||
import BoardBanner from './components/board-banner';
|
||||
import { DesktopBoardButtons } from './components/board-buttons';
|
||||
import { MobileBoardButtons } from './components/board-buttons';
|
||||
import { DesktopBoardButtons, MobileBoardButtons } from './components/board-buttons';
|
||||
import BoardNav from './components/board-nav';
|
||||
import ChallengeModal from './components/challenge-modal';
|
||||
import SubplebbitStats from './components/subplebbit-stats';
|
||||
import PostForm from './components/post-form';
|
||||
|
||||
@@ -40,25 +41,31 @@ const App = () => {
|
||||
document.body.classList.add(theme);
|
||||
}, [theme]);
|
||||
|
||||
// const globalLayout = (
|
||||
// <>
|
||||
// <ChallengeModal />
|
||||
// <Outlet />
|
||||
// </>
|
||||
// );
|
||||
const globalLayout = (
|
||||
<>
|
||||
<ChallengeModal />
|
||||
<Outlet />
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={`${styles.app} ${isInHomeView ? 'yotsuba' : theme}`}>
|
||||
<Routes>
|
||||
<Route path='/' element={<Home />} />
|
||||
<Route element={<BoardLayout />}>
|
||||
<Route path='/p/:subplebbitAddress' element={<Board />} />
|
||||
<Route path='/p/:subplebbitAddress/c/:commentCid' element={<PostPage />} />
|
||||
<Route path='/p/:subplebbitAddress/description' element={<PostPage />} />
|
||||
<Route path='/p/:subplebbitAddress/rules' element={<PostPage />} />
|
||||
<Route path='/p/:subplebbitAddress/catalog' element={<Catalog />} />
|
||||
<Route element={globalLayout}>
|
||||
<Route path='/' element={<Home />} />
|
||||
<Route element={<BoardLayout />}>
|
||||
<Route path='/p/:subplebbitAddress' element={<Board />} />
|
||||
|
||||
<Route path='/p/:subplebbitAddress/catalog' element={<Catalog />} />
|
||||
|
||||
<Route path='/p/:subplebbitAddress/c/:commentCid' element={<PostPage />} />
|
||||
<Route path='/p/:subplebbitAddress/description' element={<PostPage />} />
|
||||
<Route path='/p/:subplebbitAddress/rules' element={<PostPage />} />
|
||||
|
||||
<Route path='/profile/:accountCommentIndex' element={<PendingPost />} />
|
||||
</Route>
|
||||
<Route path='/settings' element={<Settings />} />
|
||||
</Route>
|
||||
<Route path='/settings' element={<Settings />} />
|
||||
</Routes>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user