aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views/center/index.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-04-16 18:01:38 +0800
committercrupest <crupest@outlook.com>2021-04-16 18:01:48 +0800
commitb0cf464004142dce602fa882c8d638605be7e479 (patch)
tree5fbff51ad6d40c53dafc10779b643c4c27f3c472 /FrontEnd/src/app/views/center/index.tsx
parent3fd4375920c7692082f6e8e91d763ec5c0a1d72a (diff)
downloadtimeline-b0cf464004142dce602fa882c8d638605be7e479.tar.gz
timeline-b0cf464004142dce602fa882c8d638605be7e479.tar.bz2
timeline-b0cf464004142dce602fa882c8d638605be7e479.zip
...
Diffstat (limited to 'FrontEnd/src/app/views/center/index.tsx')
-rw-r--r--FrontEnd/src/app/views/center/index.tsx17
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