diff options
author | crupest <crupest@outlook.com> | 2021-01-31 13:21:06 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-01-31 13:21:06 +0800 |
commit | 918f95072952ddfdbcc131228455ca48b0299774 (patch) | |
tree | 095e3bd9c4345e166eafa281363a38c070118fc4 /FrontEnd/src | |
parent | 97dbe15a010f29c5e9116f3711f50a34fb748153 (diff) | |
download | timeline-918f95072952ddfdbcc131228455ca48b0299774.tar.gz timeline-918f95072952ddfdbcc131228455ca48b0299774.tar.bz2 timeline-918f95072952ddfdbcc131228455ca48b0299774.zip |
...
Diffstat (limited to 'FrontEnd/src')
-rw-r--r-- | FrontEnd/src/app/locales/en/translation.json | 1 | ||||
-rw-r--r-- | FrontEnd/src/app/locales/zh/translation.json | 1 | ||||
-rw-r--r-- | FrontEnd/src/app/views/home/index.tsx | 16 |
3 files changed, 3 insertions, 15 deletions
diff --git a/FrontEnd/src/app/locales/en/translation.json b/FrontEnd/src/app/locales/en/translation.json index 0aafb2ae..c86e1e33 100644 --- a/FrontEnd/src/app/locales/en/translation.json +++ b/FrontEnd/src/app/locales/en/translation.json @@ -21,7 +21,6 @@ "chooseImage": "Choose a image", "loadImageError": "Failed to load image.", "home": { - "go": "Go!", "highlightTimeline": "Highlight Timelines", "relatedTimeline": "Timelines Related To You", "publicTimeline": "Public Timelines", diff --git a/FrontEnd/src/app/locales/zh/translation.json b/FrontEnd/src/app/locales/zh/translation.json index a12a6296..4c839387 100644 --- a/FrontEnd/src/app/locales/zh/translation.json +++ b/FrontEnd/src/app/locales/zh/translation.json @@ -21,7 +21,6 @@ "chooseImage": "选择一个图片", "loadImageError": "加载图片失败", "home": { - "go": "冲!", "highlightTimeline": "高光时间线", "relatedTimeline": "关于你的时间线", "publicTimeline": "公开时间线", 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 ( <> <Container> @@ -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 && ( <Button |