From e75beb73241e4fd2e986c7010b6e6c4595defa47 Mon Sep 17 00:00:00 2001 From: jialin Date: Tue, 7 Jul 2026 20:12:19 +0800 Subject: [PATCH] fix(footer): show version reactively via useAtom --- src/components/footer/index.tsx | 5 +++-- src/pages/login/index.tsx | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index 48acfc50..125b5334 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -1,10 +1,10 @@ import { GPUStackVersionAtom } from '@/atoms/user'; -import { getAtomStorage } from '@/atoms/utils'; import VersionInfo, { modalConfig } from '@/components/version-info'; import externalLinks from '@/constants/external-links'; import { useIntl } from '@umijs/max'; import { Button, Divider, Modal, Typography } from 'antd'; import { createStyles } from 'antd-style'; +import { useAtom } from 'jotai'; import styled from 'styled-components'; const CompanyWrapper = styled.div` @@ -35,6 +35,7 @@ const Footer: React.FC = () => { const intl = useIntl(); const [modal, contextHolder] = Modal.useModal(); const { styles } = useStyles(); + const [version] = useAtom(GPUStackVersionAtom); const showVersion = () => { modal.info({ @@ -73,7 +74,7 @@ const Footer: React.FC = () => { diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index 89ea0434..6d10f389 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -131,8 +131,6 @@ const Login = () => { [shouldUseCustomLogin, userSettings] ); - console.log('useCustomLogin', useCustomLogin, userSettings); - const gotoDefaultPage = async (info: any) => { if (!info || info?.require_password_change) { return;