addd HPG state

This commit is contained in:
PxlLoewe
2025-05-21 14:48:07 -07:00
parent f52f870eed
commit 64ce254239
8 changed files with 165 additions and 28 deletions

View File

@@ -5,6 +5,7 @@ import { toast } from "react-hot-toast";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactNode, useEffect, useState } from "react";
import { dispatchSocket } from "dispatch/socket";
import { Mission } from "@repo/db";
export function QueryProvider({ children }: { children: ReactNode }) {
const [queryClient] = useState(
@@ -22,7 +23,7 @@ export function QueryProvider({ children }: { children: ReactNode }) {
}),
);
useEffect(() => {
const invalidateMission = () => {
const invalidateMission = (mission: Mission) => {
queryClient.invalidateQueries({
queryKey: ["missions"],
});