Adds the full Next.js app (app/, components/, lib/, scripts/, assets/, docs/, Dockerfile, compose, configs) to version control. Security: - CIPC BizPortal customer-code logins (Login 1 + Login 3) now read CIPC_LOGIN1_CODE / CIPC_LOGIN1_PASSWORD / CIPC_LOGIN3_CODE / CIPC_LOGIN3_PASSWORD from .env.local instead of source. - BizPortal personal login in apply-bizportal route reads BIZPORTAL_ID_NO / BIZPORTAL_PASSWORD. - Added .env.example as the committed template. .gitignore excludes .env*, node_modules, .next, logs, sqlite, Playwright storage_state.json (live CIPC cookies), scratch dirs, client PDFs and debug screenshots.
25 lines
706 B
TypeScript
25 lines
706 B
TypeScript
// components/QueryProvider.tsx
|
|
// Wraps the app in TanStack Query's QueryClientProvider. Lives high
|
|
// in the tree so all client components can call useQuery / useMutation.
|
|
|
|
"use client";
|
|
|
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
import { useState } from "react";
|
|
|
|
export default function QueryProvider({ children }: { children: React.ReactNode }) {
|
|
const [client] = useState(
|
|
() =>
|
|
new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
staleTime: 30_000,
|
|
refetchOnWindowFocus: false,
|
|
retry: 1
|
|
}
|
|
}
|
|
})
|
|
);
|
|
|
|
return <QueryClientProvider client={client}>{children}</QueryClientProvider>;
|
|
}
|