feat: adição de novos ícones SVG e configuração do ambiente
- Adicionados ícones SVG para ChatGPT, Claude, Gemini e OpenRouter - Implementados ícones para modos claro e escuro do ChatGPT - Criado script de inicialização para PostgreSQL com extensão pgcrypto - Adicionado script de configuração de ambiente que faz backup do .env - Configurado tsconfig.json para TypeScript com opções de compilação
This commit is contained in:
47
app/(dashboard)/calendario/page.tsx
Normal file
47
app/(dashboard)/calendario/page.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
import MonthPicker from "@/components/month-picker/month-picker";
|
||||
import { getUserId } from "@/lib/auth/server";
|
||||
import {
|
||||
getSingleParam,
|
||||
type ResolvedSearchParams,
|
||||
} from "@/lib/lancamentos/page-helpers";
|
||||
import { parsePeriodParam } from "@/lib/utils/period";
|
||||
|
||||
import { MonthlyCalendar } from "@/components/calendario/monthly-calendar";
|
||||
import { fetchCalendarData } from "./data";
|
||||
import type { CalendarPeriod } from "@/components/calendario/types";
|
||||
|
||||
type PageSearchParams = Promise<ResolvedSearchParams>;
|
||||
|
||||
type PageProps = {
|
||||
searchParams?: PageSearchParams;
|
||||
};
|
||||
|
||||
export default async function Page({ searchParams }: PageProps) {
|
||||
const userId = await getUserId();
|
||||
const resolvedParams = searchParams ? await searchParams : undefined;
|
||||
|
||||
const periodoParam = getSingleParam(resolvedParams, "periodo");
|
||||
const { period, monthName, year } = parsePeriodParam(periodoParam);
|
||||
|
||||
const calendarData = await fetchCalendarData({
|
||||
userId,
|
||||
period,
|
||||
});
|
||||
|
||||
const calendarPeriod: CalendarPeriod = {
|
||||
period,
|
||||
monthName,
|
||||
year,
|
||||
};
|
||||
|
||||
return (
|
||||
<main className="flex flex-col gap-3">
|
||||
<MonthPicker />
|
||||
<MonthlyCalendar
|
||||
period={calendarPeriod}
|
||||
events={calendarData.events}
|
||||
formOptions={calendarData.formOptions}
|
||||
/>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user