first commit

This commit is contained in:
2025-11-20 19:09:43 +00:00
parent b296fe227e
commit 8284b1dd11
38 changed files with 3043 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
import { QueryClient } from "@tanstack/react-query";
export const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 60_000,
refetchOnWindowFocus: false,
},
},
});

View File

@@ -0,0 +1,5 @@
export const wsConfig = {
infoBar: "ws://100.115.148.59/websocket-infobar",
};
export type SocketKey = keyof typeof wsConfig;

View File

@@ -0,0 +1,7 @@
import { QueryClientProvider } from "@tanstack/react-query";
import { queryClient } from "../config/queryClient";
import type { PropsWithChildren } from "react";
export const AppProviders = ({ children }: PropsWithChildren) => {
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
};

View File

@@ -0,0 +1,7 @@
import type { PropsWithChildren } from "react";
import { QueryClientProvider } from "@tanstack/react-query";
import { queryClient } from "../config/queryClient";
export function QueryProvider({ children }: PropsWithChildren) {
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
}