Pull-to-refresh on Pulse, usePullToRefresh hook
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
|
||||
import Link from "next/link";
|
||||
import { Puzzle, Timer, Sparkles, Settings } from "lucide-react";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import { StatusCard } from "@/components/StatusCard";
|
||||
import { StatsCard } from "@/components/StatsCard";
|
||||
import { SessionCard } from "@/components/SessionCard";
|
||||
import { MemorySnapshotCard } from "@/components/MemorySnapshotCard";
|
||||
import { useSessions } from "@/lib/hooks";
|
||||
import { usePullToRefresh } from "@/lib/usePullToRefresh";
|
||||
|
||||
const QUICK_LINKS = [
|
||||
{ href: "/skills", label: "Skills", icon: Puzzle, color: "#a78bfa" },
|
||||
@@ -16,8 +18,13 @@ const QUICK_LINKS = [
|
||||
] as const;
|
||||
|
||||
export default function PulsePage() {
|
||||
const qc = useQueryClient();
|
||||
const { data: sessionsData, isLoading } = useSessions(8);
|
||||
|
||||
usePullToRefresh(() => {
|
||||
qc.invalidateQueries();
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<h1 className="text-xl font-bold" style={{ color: "#f59e0b" }}>
|
||||
|
||||
Reference in New Issue
Block a user