mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
Raio de borda global 0.625rem → 0.7rem; ajustes finos em --card e --border. DotPattern removido do layout, tela de auth e landing page. Account-card redesenhado (cores de saldo, tooltip de flags de exclusão). Budget-card, card-item, calendário (day-cell, event-modal) com layout revisado. Auth-card-shell simplificado (sem glassmorphism/blob). Landing page com mainFeatures + extraFeatures em grid único e dark mode nos botões de CTA. Imagens de preview da landing atualizadas. CSS --data-7..10 removidas. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
import { connection } from "next/server";
|
|
import { BudgetsPage } from "@/features/budgets/components/budgets-page";
|
|
import { fetchBudgetsForUser } from "@/features/budgets/queries";
|
|
import MonthNavigation from "@/shared/components/month-picker/month-navigation";
|
|
import { getUserId } from "@/shared/lib/auth/server";
|
|
import { parsePeriodParam } from "@/shared/utils/period";
|
|
|
|
type PageSearchParams = Promise<Record<string, string | string[] | undefined>>;
|
|
|
|
type PageProps = {
|
|
searchParams?: PageSearchParams;
|
|
};
|
|
|
|
const getSingleParam = (
|
|
params: Record<string, string | string[] | undefined> | undefined,
|
|
key: string,
|
|
) => {
|
|
const value = params?.[key];
|
|
if (!value) return null;
|
|
return Array.isArray(value) ? (value[0] ?? null) : value;
|
|
};
|
|
|
|
export default async function Page({ searchParams }: PageProps) {
|
|
await connection();
|
|
const userId = await getUserId();
|
|
const resolvedSearchParams = searchParams ? await searchParams : undefined;
|
|
const periodoParam = getSingleParam(resolvedSearchParams, "periodo");
|
|
|
|
const { period: selectedPeriod } = parsePeriodParam(periodoParam);
|
|
|
|
const { budgets, categoriesOptions } = await fetchBudgetsForUser(
|
|
userId,
|
|
selectedPeriod,
|
|
);
|
|
|
|
return (
|
|
<main className="flex flex-col gap-6">
|
|
<MonthNavigation />
|
|
<BudgetsPage
|
|
budgets={budgets}
|
|
categories={categoriesOptions}
|
|
selectedPeriod={selectedPeriod}
|
|
/>
|
|
</main>
|
|
);
|
|
}
|