From d3508f1f5f105fe3edb7c196ab2fb99c84b145f8 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 16 Apr 2021 18:13:28 +0800 Subject: ... --- FrontEnd/src/app/views/home/index.tsx | 58 +++++++++-------------------------- 1 file changed, 14 insertions(+), 44 deletions(-) (limited to 'FrontEnd/src/app/views/home') diff --git a/FrontEnd/src/app/views/home/index.tsx b/FrontEnd/src/app/views/home/index.tsx index a0df6a5a..519d59f8 100644 --- a/FrontEnd/src/app/views/home/index.tsx +++ b/FrontEnd/src/app/views/home/index.tsx @@ -1,15 +1,10 @@ import React from "react"; import { useHistory } from "react-router"; -import { useTranslation } from "react-i18next"; -import { Container, Button, Row, Col } from "react-bootstrap"; import { HttpTimelineInfo } from "@/http/timeline"; import { getHttpHighlightClient } from "@/http/highlight"; -import { useUser } from "@/services/user"; - import SearchInput from "../common/SearchInput"; -import TimelineCreateDialog from "../center/TimelineCreateDialog"; import TimelineListView from "./TimelineListView"; import WebsiteIntroduction from "./WebsiteIntroduction"; @@ -22,14 +17,8 @@ const highlightTimelineMessageMap = { const HomeV2: React.FC = () => { const history = useHistory(); - const { t } = useTranslation(); - - const user = useUser(); - const [navText, setNavText] = React.useState(""); - const [dialog, setDialog] = React.useState<"create" | null>(null); - const [highlightTimelineState, setHighlightTimelineState] = React.useState< "loading" | "done" | "error" >("loading"); @@ -64,39 +53,20 @@ const HomeV2: React.FC = () => { return ( <> - - - - { - history.push(`search?q=${navText}`); - }} - additionalButton={ - user != null && ( - - ) - } - /> - - - - - - {dialog === "create" && ( - setDialog(null)} /> - )} + { + history.push(`search?q=${navText}`); + }} + alwaysOneline + /> + + ); }; -- cgit v1.2.3