The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
tweak swr config to reduce requests
TzeYiingf927255c70c4
diff --git a/studio/hooks/analytics/useLogsPreview.tsx b/studio/hooks/analytics/useLogsPreview.tsxindex 178e5778415..e8d6bd8eaed 100644--- a/studio/hooks/analytics/useLogsPreview.tsx+++ b/studio/hooks/analytics/useLogsPreview.tsx@@ -83,7 +83,7 @@ function useLogsPreview(isValidating,size,setSize,- } = useSWRInfinite<Logs>(getKeyLogs, get, { revalidateOnFocus: false })+ } = useSWRInfinite<Logs>(getKeyLogs, get, { revalidateOnFocus: false, dedupingInterval: 3000 })let logData: LogData[] = []const countUrl = `${API_URL}/projects/${projectRef}/analytics/endpoints/logs.all?${genQueryParams(@@ -94,7 +94,11 @@ function useLogsPreview(} as any)}`- const { data: countData } = useSWR<Count>(countUrl, get, { refreshInterval: 5000 })+ const { data: countData } = useSWR<Count>(countUrl, get, {+ revalidateOnFocus: false,+ dedupingInterval: 5000,+ refreshInterval: 5000,+ })const newCount = countData?.result?.[0]?.count ?? 0const refresh = async () => {