From 918f95072952ddfdbcc131228455ca48b0299774 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 31 Jan 2021 13:21:06 +0800 Subject: ... --- FrontEnd/src/app/views/home/index.tsx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'FrontEnd/src/app/views') diff --git a/FrontEnd/src/app/views/home/index.tsx b/FrontEnd/src/app/views/home/index.tsx index 3c53736d..bcf6ad6e 100644 --- a/FrontEnd/src/app/views/home/index.tsx +++ b/FrontEnd/src/app/views/home/index.tsx @@ -21,16 +21,6 @@ const HomePage: React.FC = () => { const [dialog, setDialog] = React.useState<"create" | null>(null); - const goto = React.useCallback((): void => { - if (navText === "") { - history.push("users/crupest"); - } else if (navText.startsWith("@")) { - history.push(`users/${navText.slice(1)}`); - } else { - history.push(`timelines/${navText}`); - } - }, [navText, history]); - return ( <> @@ -40,9 +30,9 @@ const HomePage: React.FC = () => { className="justify-content-center" value={navText} onChange={setNavText} - onButtonClick={goto} - buttonText={t("home.go")} - placeholder="@crupest" + onButtonClick={() => { + history.push(`search?q=${navText}`); + }} additionalButton={ user != null && (