Add TanStack Query and update dashboard card styling
- Set up @tanstack/svelte-query and devtools in root layout - Configure QueryClient with 5-minute stale time - Update dashboard card to match Figma: regular font weight, no border - Add .playwright-mcp to gitignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@publisher/utils": "workspace:*",
|
||||
"@tanstack/svelte-query": "^6.0.14",
|
||||
"@tanstack/svelte-query-devtools": "^6.0.3",
|
||||
"bits-ui": "^2.15.4",
|
||||
"clsx": "^2.1.1",
|
||||
"tailwind-merge": "^3.4.0",
|
||||
|
||||
@@ -17,11 +17,11 @@ let { title, children, class: className }: Props = $props();
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<div class="border-b border-border px-5 py-3">
|
||||
<h3 class="text-sm font-semibold text-foreground">{title}</h3>
|
||||
<div class="px-4 pb-3 pt-6">
|
||||
<h3 class="text-sm font-normal leading-[22px] text-foreground">{title}</h3>
|
||||
</div>
|
||||
|
||||
<div class="p-5">
|
||||
<div class="px-4 pb-6">
|
||||
{@render children()}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,26 @@
|
||||
<script lang="ts">
|
||||
import "../app.css";
|
||||
import type { Snippet } from "svelte";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/svelte-query";
|
||||
import { SvelteQueryDevtools } from "@tanstack/svelte-query-devtools";
|
||||
|
||||
interface Props {
|
||||
children: Snippet;
|
||||
}
|
||||
|
||||
let { children }: Props = $props();
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
staleTime: 1000 * 60 * 5, // 5 minutes
|
||||
refetchOnWindowFocus: false,
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
{@render children()}
|
||||
<QueryClientProvider client={queryClient}>
|
||||
{@render children()}
|
||||
<SvelteQueryDevtools />
|
||||
</QueryClientProvider>
|
||||
|
||||
Reference in New Issue
Block a user