From faea67ee3a1fc941985da22063110045f5506d70 Mon Sep 17 00:00:00 2001 From: Jesse Zhang <13264500190@163.com> Date: Tue, 5 Mar 2024 16:17:24 +0800 Subject: [PATCH 1/4] fix: incorrect label (#1517) --- src/components/dashboard/toolbars/ResizeImage.tsx | 4 ++-- src/messages/ja.json | 2 +- src/messages/zh-TW.json | 2 +- src/messages/zh.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/dashboard/toolbars/ResizeImage.tsx b/src/components/dashboard/toolbars/ResizeImage.tsx index 3f6fafca..eb21b4e9 100644 --- a/src/components/dashboard/toolbars/ResizeImage.tsx +++ b/src/components/dashboard/toolbars/ResizeImage.tsx @@ -11,8 +11,8 @@ const action = (view: EditorView) => { } export const ResizeImage: ICommand = { - name: "image-size", - label: "Image Size", + name: "resize-image", + label: "Resize Image", icon: "i-mingcute-aspect-ratio-line", execute: ({ view }) => { action(view) diff --git a/src/messages/ja.json b/src/messages/ja.json index f5f5ee4c..feb2ae81 100644 --- a/src/messages/ja.json +++ b/src/messages/ja.json @@ -110,7 +110,7 @@ "Link": "リンク", "Image": "画像", "Upload Image, Audio or Video": "画像、音声、動画をアップロード", - "ResizeImage": "画像のサイズを変更", + "Resize Image": "画像のサイズを変更", "Tip: xLog Flavored Markdown": "ヒント:xLog 風のマークダウン", "Preview": "プレビュー", "Publish": "公開", diff --git a/src/messages/zh-TW.json b/src/messages/zh-TW.json index fec1e610..40d854a4 100644 --- a/src/messages/zh-TW.json +++ b/src/messages/zh-TW.json @@ -159,7 +159,7 @@ "Link": "連結", "Image": "圖片", "Upload Image, Audio or Video": "上傳圖片、音頻或視頻", - "ImageSize": "調整圖片大小", + "Resize Image": "調整圖片大小", "Preview": "預覽", "Publish": "發布", "Update": "更新", diff --git a/src/messages/zh.json b/src/messages/zh.json index 67380e61..b7b32094 100644 --- a/src/messages/zh.json +++ b/src/messages/zh.json @@ -174,7 +174,7 @@ "Link": "链接", "Image": "图片", "Upload Image, Audio or Video": "上传图片、音频或视频", - "ImageSize": "调整图像大小", + "Resize Image": "调整图像大小", "Mention": "提及", "Tip: xLog Flavored Markdown": "帮助:xLog 风格的 Markdown", "Preview": "预览", From 12bcde5d2a2400f887dee1f89f203a9bee5c9abd Mon Sep 17 00:00:00 2001 From: runjuu Date: Tue, 5 Mar 2024 21:14:49 -0800 Subject: [PATCH 2/4] chore: update `@crossbell/connect-kit` (#1524) --- package.json | 14 +++---- pnpm-lock.yaml | 108 ++++++++++++++++++++++++------------------------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index a2a00311..2dc74d19 100644 --- a/package.json +++ b/package.json @@ -39,13 +39,13 @@ "@codemirror/state": "6.4.1", "@codemirror/theme-one-dark": "6.1.2", "@codemirror/view": "6.24.1", - "@crossbell/connect-kit": "1.5.25", - "@crossbell/contract": "1.5.25", - "@crossbell/indexer": "1.5.25", - "@crossbell/notification": "1.5.25", - "@crossbell/ui": "1.5.25", - "@crossbell/util-hooks": "1.5.25", - "@crossbell/util-metadata": "1.5.25", + "@crossbell/connect-kit": "1.5.26", + "@crossbell/contract": "1.5.26", + "@crossbell/indexer": "1.5.26", + "@crossbell/notification": "1.5.26", + "@crossbell/ui": "1.5.26", + "@crossbell/util-hooks": "1.5.26", + "@crossbell/util-metadata": "1.5.26", "@ddietr/codemirror-themes": "1.4.2", "@dqbd/tiktoken": "1.0.13", "@emoji-mart/data": "1.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 04c0c175..fc689661 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,26 +37,26 @@ dependencies: specifier: 6.24.1 version: 6.24.1 '@crossbell/connect-kit': - specifier: 1.5.25 - version: 1.5.25(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(@wagmi/core@1.4.13)(react-dom@18.2.0)(typescript@5.3.3)(wagmi@1.4.13)(zod@3.22.4) + specifier: 1.5.26 + version: 1.5.26(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(@wagmi/core@1.4.13)(react-dom@18.2.0)(typescript@5.3.3)(wagmi@1.4.13)(zod@3.22.4) '@crossbell/contract': - specifier: 1.5.25 - version: 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + specifier: 1.5.26 + version: 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) '@crossbell/indexer': - specifier: 1.5.25 - version: 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + specifier: 1.5.26 + version: 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) '@crossbell/notification': - specifier: 1.5.25 - version: 1.5.25(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(immer@10.0.3)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(wagmi@1.4.13)(zod@3.22.4) + specifier: 1.5.26 + version: 1.5.26(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(immer@10.0.3)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(wagmi@1.4.13)(zod@3.22.4) '@crossbell/ui': - specifier: 1.5.25 - version: 1.5.25(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + specifier: 1.5.26 + version: 1.5.26(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) '@crossbell/util-hooks': - specifier: 1.5.25 - version: 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + specifier: 1.5.26 + version: 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) '@crossbell/util-metadata': - specifier: 1.5.25 - version: 1.5.25(typescript@5.3.3)(zod@3.22.4) + specifier: 1.5.26 + version: 1.5.26(typescript@5.3.3)(zod@3.22.4) '@ddietr/codemirror-themes': specifier: 1.4.2 version: 1.4.2 @@ -1144,19 +1144,19 @@ packages: - utf-8-validate dev: false - /@crossbell/connect-kit@1.5.25(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(@wagmi/core@1.4.13)(react-dom@18.2.0)(typescript@5.3.3)(wagmi@1.4.13)(zod@3.22.4): - resolution: {integrity: sha512-Wpqltn1yCRVoW55RNey2I0xyKETjHaRL9sFa9Mhoo9HcpP4/sok8GYQA0oZvkFU5HpT/Nx9Do6R+/dZ/YMPrVg==} + /@crossbell/connect-kit@1.5.26(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(@wagmi/core@1.4.13)(react-dom@18.2.0)(typescript@5.3.3)(wagmi@1.4.13)(zod@3.22.4): + resolution: {integrity: sha512-qevd1BlFpFVWKz6S2YjItUBKXOluuOcZhUxb+Uc9NBSJGM4tkx7KfmoQVoWYvKZo97g8AOc5bUWbVAINH497ww==} peerDependencies: '@tanstack/react-query': ^4 wagmi: ^1.0.0 dependencies: - '@crossbell/contract': 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/indexer': 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/react-account': 1.5.25(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(react-dom@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/ui': 1.5.25(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/util-ethers': 1.5.25 - '@crossbell/util-hooks': 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/util-metadata': 1.5.25(typescript@5.3.3)(zod@3.22.4) + '@crossbell/contract': 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/indexer': 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/react-account': 1.5.26(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(react-dom@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/ui': 1.5.26(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/util-ethers': 1.5.26 + '@crossbell/util-hooks': 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/util-metadata': 1.5.26(typescript@5.3.3)(zod@3.22.4) '@emotion/react': 11.11.3(@types/react@18.2.56)(react@18.2.0) '@joyid/wagmi': 0.1.0(viem@1.21.1)(wagmi@1.4.13) '@mantine/core': 6.0.21(@emotion/react@11.11.3)(@mantine/hooks@6.0.21)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) @@ -1208,12 +1208,12 @@ packages: - zod dev: false - /@crossbell/contract@1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4): - resolution: {integrity: sha512-nQBrB1ADB4TAK9la/Gj0uopuBjYgddVaFmkSialWKXuBhoxkUkKjFcASOseFflAq8iomYyUO0OxEjvoAUWgI2w==} + /@crossbell/contract@1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4): + resolution: {integrity: sha512-cThhKoqSKrRM3LmcahEv9Pir7ZZGjzdEQAiRut9U1BZNUiNGlZDgI95acvFmfXpz9HrVri45S4m5Xud7HuHm3A==} peerDependencies: react: ^18 dependencies: - '@crossbell/util-hooks': 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/util-hooks': 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) crossbell: 1.11.3(typescript@5.3.3)(zod@3.22.4) react: 18.2.0 viem: 1.21.1(typescript@5.3.3)(zod@3.22.4) @@ -1226,8 +1226,8 @@ packages: - zod dev: false - /@crossbell/indexer@1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4): - resolution: {integrity: sha512-E4hfKi/ZQ+NEom7/nYdkPoETLpgGlRlsXangX2vZ/m7kC5rRoiBdF0KPBZkuIKE61r/5ziIljsAo4sX341kWzg==} + /@crossbell/indexer@1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4): + resolution: {integrity: sha512-qdDujKJhBuW9NXdQsNfa+h0nBoV8M3qhiu9t7cGY9/YbvlbGpIfMiuJytTiubv9IgnuYw30QqxpYXHDAvLmGww==} dependencies: '@tanstack/react-query': 4.36.1(react-dom@18.2.0)(react@18.2.0) crossbell: 1.11.3(typescript@5.3.3)(zod@3.22.4) @@ -1249,18 +1249,18 @@ packages: resolution: {integrity: sha512-wPNLptEPy64/7WMz7bhS5QVYfjproCr3ACgeQoJzmNKvH2FNDlF6FjMB9XNwV0spAczGb/SueNzW8p6BBLXHnw==} dev: false - /@crossbell/notification@1.5.25(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(immer@10.0.3)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(wagmi@1.4.13)(zod@3.22.4): - resolution: {integrity: sha512-aTjbpMidLKwDyAQGtoM7GPQD32m5tXKSBXSzZQ00Kpl2Cc3yDhZG+LSgBvcbraPrL1WNxDkbY3LTqaVQhXEhHw==} + /@crossbell/notification@1.5.26(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(immer@10.0.3)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(wagmi@1.4.13)(zod@3.22.4): + resolution: {integrity: sha512-VtnHTohd0SNSwopyt4Y9xxvkxo33rgfR6+4zCZxiLsaBcsEbD4+YU68KXbdhfwHc1Xuunov520u6P+u8SraZsw==} peerDependencies: '@tanstack/react-query': ^4 react: ^18 wagmi: ^1.0.0 dependencies: - '@crossbell/indexer': 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/react-account': 1.5.25(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(react-dom@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/ui': 1.5.25(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/util-hooks': 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/util-metadata': 1.5.25(typescript@5.3.3)(zod@3.22.4) + '@crossbell/indexer': 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/react-account': 1.5.26(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(react-dom@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/ui': 1.5.26(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/util-hooks': 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/util-metadata': 1.5.26(typescript@5.3.3)(zod@3.22.4) '@tanstack/react-query': 4.36.1(react-dom@18.2.0)(react@18.2.0) classnames: 2.5.1 dayjs: 1.11.10 @@ -1280,16 +1280,16 @@ packages: - zod dev: false - /@crossbell/react-account@1.5.25(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(react-dom@18.2.0)(typescript@5.3.3)(zod@3.22.4): - resolution: {integrity: sha512-c7Kfkf+8m18IWWY5oSav839TD/cTaso3UFBFDq7lT85Lp3qmYidQhAvoPo4jgLlMx/+sSfWF3OKskngvriq4pw==} + /@crossbell/react-account@1.5.26(@tanstack/react-query@4.36.1)(@types/react@18.2.56)(react-dom@18.2.0)(typescript@5.3.3)(zod@3.22.4): + resolution: {integrity: sha512-UWuyf8Zci/gLyePSy011/lGzImnuvFFBFteqsMbr8JzQYUjbBrh3Hm7GpLAoJlxDH4EEnqyo9qPXvncH8e+brw==} peerDependencies: '@tanstack/react-query': ^4 dependencies: - '@crossbell/contract': 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/indexer': 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/util-ethers': 1.5.25 - '@crossbell/util-hooks': 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/util-metadata': 1.5.25(typescript@5.3.3)(zod@3.22.4) + '@crossbell/contract': 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/indexer': 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/util-ethers': 1.5.26 + '@crossbell/util-hooks': 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/util-metadata': 1.5.26(typescript@5.3.3)(zod@3.22.4) '@tanstack/react-query': 4.36.1(react-dom@18.2.0)(react@18.2.0) check-password-strength: 2.0.7 crossbell: 1.11.3(typescript@5.3.3)(zod@3.22.4) @@ -1311,15 +1311,15 @@ packages: - zod dev: false - /@crossbell/ui@1.5.25(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4): - resolution: {integrity: sha512-xY/ZeipS54s+aTm8cQaS+tdYaTF7/z/oZEIwOs52iljQ7YriV4NWdR5exZkSty8QaQ1jNX+8qvv6vbaGNM5vqw==} + /@crossbell/ui@1.5.26(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4): + resolution: {integrity: sha512-LXn7PUwonZYDho5YPp+i0l9yE1g2EltbqcNYlQsf4o7zpjSwJ69BM0UuJg315zgtKRfRGTgJXg4LdEIQ7vBN7A==} peerDependencies: react: ^18 react-dom: ^18 dependencies: - '@crossbell/indexer': 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/util-hooks': 1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) - '@crossbell/util-metadata': 1.5.25(typescript@5.3.3)(zod@3.22.4) + '@crossbell/indexer': 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/util-hooks': 1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4) + '@crossbell/util-metadata': 1.5.26(typescript@5.3.3)(zod@3.22.4) '@tanstack/react-query': 4.36.1(react-dom@18.2.0)(react@18.2.0) classnames: 2.5.1 crossbell: 1.11.3(typescript@5.3.3)(zod@3.22.4) @@ -1339,12 +1339,12 @@ packages: - zod dev: false - /@crossbell/util-ethers@1.5.25: - resolution: {integrity: sha512-3XYcCfzkMBk+dQxEhRiSE5sgpR6c4CE+MbaIz4SGU4elrgo2WXhh9HLOgtthfVFu7Vxmw6yfw6yxmAWsaS+hqw==} + /@crossbell/util-ethers@1.5.26: + resolution: {integrity: sha512-0p1tazglzDaSGIBBkTOtKu855sZGpqr65rGOAdUlUyECpLPyVsR+g7NheTNti2U+Zh0cS6rptUrx+i5dZAzXAg==} dev: false - /@crossbell/util-hooks@1.5.25(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4): - resolution: {integrity: sha512-XrKFGHqscSx47myZebC6Ssv+sR7wJyiaLBJoeKdPGLw6kP2tYlUF3ZFg+5P8RRO3ZssKwhT0s7yY6ijDRgXvfw==} + /@crossbell/util-hooks@1.5.26(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(zod@3.22.4): + resolution: {integrity: sha512-8qVBzpjPvvvaPW73lc+Vj9s1sVpDCynOyeqCE5ETsl3R0/ZLpBa4aAn9gpRWLmC+BCYYfetatx9L2kuNIIH4jA==} peerDependencies: react: ^18 dependencies: @@ -1360,10 +1360,10 @@ packages: - zod dev: false - /@crossbell/util-metadata@1.5.25(typescript@5.3.3)(zod@3.22.4): - resolution: {integrity: sha512-n/mYgLR78yYMdlwmwoKKDOSxWqX81y2ditm82tt7Yw6aettYwutp77xhJZ8WxV+TVqCVaxgg0VoPgfzyG6Gd6Q==} + /@crossbell/util-metadata@1.5.26(typescript@5.3.3)(zod@3.22.4): + resolution: {integrity: sha512-3zEnq0AJuUfKqjYDg09Gp01t5MScQddKU1Ab7ot8cLWYhJgKr+4cxQoyMgEbb+KLQ6K26f6A05yfBcueLc219g==} dependencies: - '@crossbell/util-ethers': 1.5.25 + '@crossbell/util-ethers': 1.5.26 '@fastify/deepmerge': 1.3.0 crossbell: 1.11.3(typescript@5.3.3)(zod@3.22.4) transitivePeerDependencies: From 884200e153e4f22d790902f7c8ec9ca5d805bc42 Mon Sep 17 00:00:00 2001 From: Lesenelir Date: Thu, 7 Mar 2024 17:33:57 +0800 Subject: [PATCH 3/4] refactor: move component definitions outside the component (#1531) --- src/app/[locale]/(home)/about/page.tsx | 25 ++++--------------------- src/components/home/EntranceButton.tsx | 18 +++++++++++------- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/src/app/[locale]/(home)/about/page.tsx b/src/app/[locale]/(home)/about/page.tsx index cdaeb7fc..98c4c239 100644 --- a/src/app/[locale]/(home)/about/page.tsx +++ b/src/app/[locale]/(home)/about/page.tsx @@ -1,10 +1,9 @@ import { getTranslations } from "next-intl/server" import Link from "next/link" -import { memo } from "react" import { Logo } from "~/components/common/Logo" import { BlockNumber } from "~/components/home/BlockNumber" -import { default as OriginEntranceButton } from "~/components/home/EntranceButton" +import { EntranceButton } from "~/components/home/EntranceButton" import { Integration } from "~/components/home/Integrations" import { ShowCase } from "~/components/home/Showcase" import { Button } from "~/components/ui/Button" @@ -12,23 +11,9 @@ import { Image } from "~/components/ui/Image" import { CSB_SCAN, GITHUB_LINK } from "~/lib/env" import { getSiteLink } from "~/lib/helpers" -async function Home() { +export default async function Home() { const t = await getTranslations() - const EntranceButton = memo(function Button() { - return ( - - - {t("Dashboard")} - - } - unconnectedContent={t("Get my xLog in 5 minutes")} - /> - ) - }) - const features: { title: string subfeatures: { @@ -181,7 +166,7 @@ async function Home() { } >
{index + 1}
@@ -325,7 +310,7 @@ async function Home() {
-
+
@@ -333,5 +318,3 @@ async function Home() {
) } - -export default Home diff --git a/src/components/home/EntranceButton.tsx b/src/components/home/EntranceButton.tsx index b606e0cb..dd41a9d7 100644 --- a/src/components/home/EntranceButton.tsx +++ b/src/components/home/EntranceButton.tsx @@ -1,5 +1,6 @@ "use client" +import { useTranslations } from "next-intl" import { useRouter } from "next/navigation" import React from "react" @@ -7,13 +8,9 @@ import { useAccountState } from "@crossbell/connect-kit" import { Button } from "~/components/ui/Button" -interface Props { - connectedContent: React.ReactNode - unconnectedContent: React.ReactNode -} - -export default function EntranceButton(props: Props) { +export function EntranceButton() { const router = useRouter() + const t = useTranslations() const isConnected = useAccountState((s) => !!s.computed.account) return ( @@ -23,7 +20,14 @@ export default function EntranceButton(props: Props) { size="2xl" variantColor="black" > - {isConnected ? props.connectedContent : props.unconnectedContent} + {isConnected ? ( + <> + + {t("Dashboard")} + + ) : ( + {t("Get my xLog in 5 minutes")} + )} ) } From 8e0b89a98d1a827963e823d96b1fd6d1f2c784a7 Mon Sep 17 00:00:00 2001 From: Lesenelir Date: Thu, 7 Mar 2024 17:35:54 +0800 Subject: [PATCH 4/4] feat: add external link redirection to CharacterCard (#1530) --- src/components/common/CharacterCard.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/common/CharacterCard.tsx b/src/components/common/CharacterCard.tsx index 27015371..2592d3cf 100644 --- a/src/components/common/CharacterCard.tsx +++ b/src/components/common/CharacterCard.tsx @@ -6,6 +6,7 @@ import { Titles } from "~/components/common/Titles" import { Avatar } from "~/components/ui/Avatar" import { Skeleton } from "~/components/ui/Skeleton" import { useDate } from "~/hooks/useDate" +import { getSiteLink } from "~/lib/helpers" import { cn } from "~/lib/utils" import { useGetCharacterCard } from "~/queries/site" @@ -65,7 +66,17 @@ export const CharacterCard = ({ )} - + { + e.preventDefault() + window.open( + `${getSiteLink({ + subdomain: siteId || "", + })}`, + ) + }} + > {site?.metadata?.content?.name}