From 92796e5ad6554c4c5731cc2a1cf1218a266711d0 Mon Sep 17 00:00:00 2001 From: 1111mp Date: Fri, 22 Nov 2024 17:08:40 +0800 Subject: [PATCH] fix: clicking on the version link will open two duplicate browser windows Signed-off-by: 1111mp --- src/pages/versions/index.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/pages/versions/index.tsx b/src/pages/versions/index.tsx index 2190080..a45a505 100644 --- a/src/pages/versions/index.tsx +++ b/src/pages/versions/index.tsx @@ -32,6 +32,7 @@ import { Modal, type Ref as ModalRef } from './modal'; import dayjs from 'dayjs'; import localizedFormat from 'dayjs/plugin/localizedFormat'; import { useTranslation } from 'react-i18next'; +import { open } from '@tauri-apps/plugin-shell'; import { useAppContext } from '@/app-context'; import { vCurrent, @@ -133,15 +134,20 @@ export const Versions: React.FC = () => { { + await open( + `https://github.com/nodejs/node/releases/tag/${version}` + ); + }} > {version} - {t('Whats-new')} + + {t('Whats-new')} + {lts ? (