diff options
| author | crupest <crupest@outlook.com> | 2021-04-16 18:01:38 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2021-04-16 18:01:48 +0800 | 
| commit | 9d2efb381bdd4e3f162a502a1260542a9a7db44b (patch) | |
| tree | 309dcdd767c7e77c1432652a594aafff9d639237 /FrontEnd/src/app/views/center/index.tsx | |
| parent | 2981b7fb9002ee424a4e4358f04914de63f60141 (diff) | |
| download | timeline-9d2efb381bdd4e3f162a502a1260542a9a7db44b.tar.gz timeline-9d2efb381bdd4e3f162a502a1260542a9a7db44b.tar.bz2 timeline-9d2efb381bdd4e3f162a502a1260542a9a7db44b.zip  | |
...
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  | 
