ソースを参照

Update

stable1
B.E.N.S.O.N 2週間前
コミット
9be15c0d1c
1個のファイルの変更9行の追加0行の削除
  1. +9
    -0
      src/app/(main)/report/page.tsx

+ 9
- 0
src/app/(main)/report/page.tsx ファイルの表示

@@ -143,7 +143,16 @@ export default function ReportPage() {
setDynamicOptions({});
}, [selectedReportId]);

// React 18 Strict Mode (dev) mounts → unmounts → remounts, so effects with [] run twice.
// Dedupe PAGE_VIEW within a short window so 進入頁面次數 is +1 per real visit.
useEffect(() => {
if (typeof window === "undefined") return;
const w = window as Window & { __fpsmsReportPageViewLoggedAt?: number };
const now = Date.now();
if (w.__fpsmsReportPageViewLoggedAt != null && now - w.__fpsmsReportPageViewLoggedAt < 2000) {
return;
}
w.__fpsmsReportPageViewLoggedAt = now;
logFeatureUsage(FEATURE_USAGE.REPORT_MANAGEMENT, FEATURE_USAGE_ACTION.PAGE_VIEW);
}, []);



読み込み中…
キャンセル
保存