diff options
Diffstat (limited to 'FrontEnd/src/app/views/center/index.tsx')
-rw-r--r-- | FrontEnd/src/app/views/center/index.tsx | 17 |
1 files changed, 5 insertions, 12 deletions
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 |