summaryrefslogtreecommitdiffhomepage
path: root/frontend/src/routes
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2024-07-27 16:44:01 -0400
committerrealtradam <[email protected]>2024-07-27 16:44:01 -0400
commitf75c5d9264d71298711321d83a9c6b23327b3f56 (patch)
treeb7f964a1e37cdead6a198e1138cc1f06331b0eb5 /frontend/src/routes
parentb1112afc5162bb299d528974594dcf7c2ec46266 (diff)
downloadspring-blog-f75c5d9264d71298711321d83a9c6b23327b3f56.tar.gz
spring-blog-f75c5d9264d71298711321d83a9c6b23327b3f56.zip
fix linting
Diffstat (limited to 'frontend/src/routes')
-rw-r--r--frontend/src/routes/index.tsx55
1 files changed, 29 insertions, 26 deletions
diff --git a/frontend/src/routes/index.tsx b/frontend/src/routes/index.tsx
index b46315b..cee3529 100644
--- a/frontend/src/routes/index.tsx
+++ b/frontend/src/routes/index.tsx
@@ -8,36 +8,39 @@ import Register from "../pages/auth/Register";
import Login from "../pages/auth/Login";
type user = {
- set: React.Dispatch<React.SetStateAction<string | null>>;
- value: string | null;
+ set: React.Dispatch<React.SetStateAction<string | null>>;
+ value: string | null;
};
type articleSearch = user;
export default function Index() {
- const [user, setUser] = useState<string | null>(null);
- const [articleSearch, setArticleSearch] = useState<string | null>(null);
+ const [user, setUser] = useState<string | null>(null);
+ const [articleSearch, setArticleSearch] = useState<string | null>(null);
- const userProp: user = { set: setUser, value: user };
- const articleSearchProp: articleSearch = {
- set: setArticleSearch,
- value: articleSearch,
- };
+ const userProp: user = { set: setUser, value: user };
+ const articleSearchProp: articleSearch = {
+ set: setArticleSearch,
+ value: articleSearch,
+ };
- return (
- <>
- <Router>
- <Routes>
- <Route
- path="/"
- element={<Layout user={userProp} articleSearch={articleSearchProp} />}>
- <Route index element={<Home articleSearch={articleSearchProp} />} />
- <Route path="/article/:id" element={<Article />} />
- <Route path="/article/new" element={<NewArticle />} />
- <Route path="register" element={<Register />} />
- <Route path="login" element={<Login user={userProp} />} />
- </Route>
- </Routes>
- </Router>
- </>
- );
+ return (
+ <>
+ <Router>
+ <Routes>
+ <Route
+ path="/"
+ element={
+ <Layout user={userProp} articleSearch={articleSearchProp} />
+ }
+ >
+ <Route index element={<Home articleSearch={articleSearchProp} />} />
+ <Route path="/article/:id" element={<Article />} />
+ <Route path="/article/new" element={<NewArticle />} />
+ <Route path="register" element={<Register />} />
+ <Route path="login" element={<Login user={userProp} />} />
+ </Route>
+ </Routes>
+ </Router>
+ </>
+ );
}