From 159d81ed127a476b53c37e2cb99d646ee423de15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9D=B0?= Date: Mon, 9 Feb 2026 20:07:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AF=A6=E6=83=85=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8C=89=E9=92=AE=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ src/components/GameManagePopup/index.tsx | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ebe3e16..26b7f68 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ node_modules/ src/config/env.ts .vscode *.http +.cursor +.codewiz diff --git a/src/components/GameManagePopup/index.tsx b/src/components/GameManagePopup/index.tsx index 1440b81..bf7abcb 100644 --- a/src/components/GameManagePopup/index.tsx +++ b/src/components/GameManagePopup/index.tsx @@ -189,7 +189,8 @@ export default forwardRef(function GameManagePopup(props, ref) { detail.match_status, ); - const inTwoHours = dayjs(detail.start_time).diff(dayjs(), "hour") < 2; + // const inTwoHours = dayjs(detail.start_time).diff(dayjs(), "hour") < 2; + const beforeStart = dayjs(detail.start_time).isAfter(dayjs()); const hasOtherParticiappants = (detail.participants || []) .filter((item) => item.status === "joined") @@ -207,7 +208,7 @@ export default forwardRef(function GameManagePopup(props, ref) { style={{ minHeight: "unset" }} > - {!finished && !inTwoHours && !hasOtherParticiappants && ( + {!finished && !hasOtherParticiappants && beforeStart && ( 编辑活动 @@ -217,12 +218,12 @@ export default forwardRef(function GameManagePopup(props, ref) { 重新发布 )} - {!finished && !inTwoHours && !hasOtherParticiappants && ( + {!finished && beforeStart && ( 取消活动 )} - {!finished && hasJoin && ( + {!finished && beforeStart && hasJoin && ( 退出活动