mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 21:35:19 +00:00
BREAKING: postgres + saas
This commit is contained in:
39
app/(app)/dashboard/page.tsx
Normal file
39
app/(app)/dashboard/page.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
import DashboardDropZoneWidget from "@/components/dashboard/drop-zone-widget"
|
||||
import { StatsWidget } from "@/components/dashboard/stats-widget"
|
||||
import DashboardUnsortedWidget from "@/components/dashboard/unsorted-widget"
|
||||
import { WelcomeWidget } from "@/components/dashboard/welcome-widget"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { getCurrentUser } from "@/lib/auth"
|
||||
import { APP_DESCRIPTION } from "@/lib/constants"
|
||||
import { getUnsortedFiles } from "@/models/files"
|
||||
import { getSettings } from "@/models/settings"
|
||||
import { TransactionFilters } from "@/models/transactions"
|
||||
import { Metadata } from "next"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Dashboard",
|
||||
description: APP_DESCRIPTION,
|
||||
}
|
||||
|
||||
export default async function Dashboard({ searchParams }: { searchParams: Promise<TransactionFilters> }) {
|
||||
const filters = await searchParams
|
||||
const user = await getCurrentUser()
|
||||
const unsortedFiles = await getUnsortedFiles(user.id)
|
||||
const settings = await getSettings(user.id)
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-5 p-5 w-full max-w-7xl self-center">
|
||||
<div className="flex flex-col sm:flex-row gap-5 items-stretch h-full">
|
||||
<DashboardDropZoneWidget />
|
||||
|
||||
<DashboardUnsortedWidget files={unsortedFiles} />
|
||||
</div>
|
||||
|
||||
{settings.is_welcome_message_hidden !== "true" && <WelcomeWidget />}
|
||||
|
||||
<Separator />
|
||||
|
||||
<StatsWidget filters={filters} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user