Skip to content

Project NOMAD is an offline-first knowledge and education server. Wikipedia, thousands of books, courses, maps, and optional local AI, all running on hardware you own with no internet required.

TypeScript
513 B
Raw Blame
import api from "~/lib/api"
import { useQuery } from "@tanstack/react-query"

export const BENCHMARK_RERUN_BANNER_QUERY_KEY = ['benchmark-rerun-banner']

export const useBenchmarkRerunBanner = () => {
    const queryData = useQuery<{ show: boolean } | undefined>({
        queryKey: BENCHMARK_RERUN_BANNER_QUERY_KEY,
        queryFn: () => api.checkBenchmarkRerunBanner(),
        refetchInterval: Infinity, // Disable automatic refetching
        refetchOnWindowFocus: false,
    })

    return queryData.data
}