repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | "use client"; |
| #2 | |
| #3 | import { useEffect } from "react"; |
| #4 | import { MemoriesSection } from "@/app/memories/components/MemoriesSection"; |
| #5 | import { MemoryFilters } from "@/app/memories/components/MemoryFilters"; |
| #6 | import { useRouter, useSearchParams } from "next/navigation"; |
| #7 | import "@/styles/animation.css"; |
| #8 | import UpdateMemory from "@/components/shared/update-memory"; |
| #9 | import { useUI } from "@/hooks/useUI"; |
| #10 | |
| #11 | export default function MemoriesPage() { |
| #12 | const router = useRouter(); |
| #13 | const searchParams = useSearchParams(); |
| #14 | const { updateMemoryDialog, handleCloseUpdateMemoryDialog } = useUI(); |
| #15 | useEffect(() => { |
| #16 | // Set default pagination values if not present in URL |
| #17 | if (!searchParams.has("page") || !searchParams.has("size")) { |
| #18 | const params = new URLSearchParams(searchParams.toString()); |
| #19 | if (!searchParams.has("page")) params.set("page", "1"); |
| #20 | if (!searchParams.has("size")) params.set("size", "10"); |
| #21 | router.push(`?${params.toString()}`); |
| #22 | } |
| #23 | }, []); |
| #24 | |
| #25 | return ( |
| #26 | <div className=""> |
| #27 | <UpdateMemory |
| #28 | memoryId={updateMemoryDialog.memoryId || ""} |
| #29 | memoryContent={updateMemoryDialog.memoryContent || ""} |
| #30 | open={updateMemoryDialog.isOpen} |
| #31 | onOpenChange={handleCloseUpdateMemoryDialog} |
| #32 | /> |
| #33 | <main className="flex-1 py-6"> |
| #34 | <div className="container"> |
| #35 | <div className="mt-1 pb-4 animate-fade-slide-down"> |
| #36 | <MemoryFilters /> |
| #37 | </div> |
| #38 | <div className="animate-fade-slide-down delay-1"> |
| #39 | <MemoriesSection /> |
| #40 | </div> |
| #41 | </div> |
| #42 | </main> |
| #43 | </div> |
| #44 | ); |
| #45 | } |
| #46 |