aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FrontEnd/src/app/locales/en/translation.json1
-rw-r--r--FrontEnd/src/app/locales/zh/translation.json1
-rw-r--r--FrontEnd/src/app/views/home/index.tsx16
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