From b0cf464004142dce602fa882c8d638605be7e479 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Fri, 16 Apr 2021 18:01:38 +0800
Subject: ...

---
 FrontEnd/src/app/views/center/index.tsx | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

(limited to 'FrontEnd/src/app/views/center/index.tsx')

diff --git a/FrontEnd/src/app/views/center/index.tsx b/FrontEnd/src/app/views/center/index.tsx
index bcf6ad6e..0a2abb2c 100644
--- a/FrontEnd/src/app/views/center/index.tsx
+++ b/FrontEnd/src/app/views/center/index.tsx
@@ -3,11 +3,10 @@ import { useHistory } from "react-router";
 import { useTranslation } from "react-i18next";
 import { Row, Container, Button, Col } from "react-bootstrap";
 
-import { useUser } from "@/services/user";
-import SearchInput from "../common/SearchInput";
+import { useUserLoggedIn } from "@/services/user";
 
-import BoardWithoutUser from "./BoardWithoutUser";
-import BoardWithUser from "./BoardWithUser";
+import SearchInput from "../common/SearchInput";
+import CenterBoards from "./CenterBoards";
 import TimelineCreateDialog from "./TimelineCreateDialog";
 
 const HomePage: React.FC = () => {
@@ -15,7 +14,7 @@ const HomePage: React.FC = () => {
 
   const { t } = useTranslation();
 
-  const user = useUser();
+  const user = useUserLoggedIn();
 
   const [navText, setNavText] = React.useState<string>("");
 
@@ -48,13 +47,7 @@ const HomePage: React.FC = () => {
             />
           </Col>
         </Row>
-        {(() => {
-          if (user == null) {
-            return <BoardWithoutUser />;
-          } else {
-            return <BoardWithUser user={user} />;
-          }
-        })()}
+        <CenterBoards />
       </Container>
       {dialog === "create" && (
         <TimelineCreateDialog
-- 
cgit v1.2.3

