's'
This commit is contained in:
@@ -99,14 +99,14 @@ export default function JoinPaidPage() {
|
||||
if (completeStatus !== "success") return;
|
||||
setCountdown(COUNTDOWN_SECONDS);
|
||||
const timer = setInterval(() => {
|
||||
setCountdown((prev) => {
|
||||
if (prev == null || prev <= 1) {
|
||||
clearInterval(timer);
|
||||
window.location.replace("/");
|
||||
return 0;
|
||||
}
|
||||
return prev - 1;
|
||||
});
|
||||
setCountdown((prev) => {
|
||||
if (prev == null || prev <= 1) {
|
||||
clearInterval(timer);
|
||||
window.location.replace("/join?paid=1");
|
||||
return 0;
|
||||
}
|
||||
return prev - 1;
|
||||
});
|
||||
}, 1000);
|
||||
return () => clearInterval(timer);
|
||||
}, [completeStatus]);
|
||||
@@ -123,7 +123,7 @@ export default function JoinPaidPage() {
|
||||
<p className="mt-3 text-slate-500 dark:text-slate-400">
|
||||
{completeStatus === "success"
|
||||
? countdown != null
|
||||
? `${countdown} 秒后返回首页`
|
||||
? `${countdown} 秒后跳转报名页`
|
||||
: "感谢您的支持"
|
||||
: completeStatus === "error"
|
||||
? "请稍后刷新页面重试"
|
||||
@@ -142,10 +142,10 @@ export default function JoinPaidPage() {
|
||||
</button>
|
||||
)}
|
||||
<Link
|
||||
href="/"
|
||||
href="/join?paid=1"
|
||||
className="mt-8 inline-flex items-center gap-2 rounded-full bg-[#ff4d4f] px-8 py-3 font-semibold text-white transition-colors hover:bg-[#ff7a45]"
|
||||
>
|
||||
← 返回首页
|
||||
← 查看报名状态
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user