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 && ( 退出活动