mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
Todas as queries cacheadas do dashboard migram de `unstable_cache` para
a diretiva `use cache` com `cacheTag` e `cacheLife({ revalidate: 3 })`.
Todas as páginas e o layout do dashboard passam a chamar `connection()`
para garantir renderização dinâmica. O root layout envolve os filhos em
`<Suspense>`. `next.config.ts` remove `turbopackFileSystemCacheForDev`
e adota `cacheComponents: true`.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
638 B
TypeScript
23 lines
638 B
TypeScript
import { connection } from "next/server";
|
|
import { CardsPage } from "@/features/cards/components/cards-page";
|
|
import { fetchAllCardsForUser } from "@/features/cards/queries";
|
|
import { getUserId } from "@/shared/lib/auth/server";
|
|
|
|
export default async function Page() {
|
|
await connection();
|
|
const userId = await getUserId();
|
|
const { activeCards, archivedCards, accounts, logoOptions } =
|
|
await fetchAllCardsForUser(userId);
|
|
|
|
return (
|
|
<main className="flex flex-col items-start gap-6">
|
|
<CardsPage
|
|
cards={activeCards}
|
|
archivedCards={archivedCards}
|
|
accounts={accounts}
|
|
logoOptions={logoOptions}
|
|
/>
|
|
</main>
|
|
);
|
|
}
|