s'c1'
This commit is contained in:
13
app/components/PayStatusPollProvider.tsx
Normal file
13
app/components/PayStatusPollProvider.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import { usePayStatusPoll } from "@/app/lib/payment/usePayStatusPoll";
|
||||
|
||||
/**
|
||||
* 全局支付轮询:支付返回任意页面时检测 paid,调用 confirm 后跳转首页
|
||||
*/
|
||||
export function PayStatusPollProvider() {
|
||||
usePayStatusPoll(() => {
|
||||
window.location.href = "/";
|
||||
});
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user