diff --git a/src/app/measurements/page.tsx b/src/app/measurements/page.tsx index c075842fe..5150141e2 100644 --- a/src/app/measurements/page.tsx +++ b/src/app/measurements/page.tsx @@ -5,13 +5,7 @@ import { useAuth } from "@/hooks/use-auth"; import { MeasurementForm } from "@/components/measurements/measurement-form"; import { MeasurementList } from "@/components/measurements/measurement-list"; import { Button } from "@/components/ui/button"; -import { - Dialog, - DialogContent, - DialogHeader, - DialogTitle, - DialogTrigger, -} from "@/components/ui/dialog"; +import { ResponsiveSheet } from "@/components/ui/responsive-sheet"; import { Plus, Loader2 } from "lucide-react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; @@ -48,25 +42,23 @@ export default function MeasurementsPage() { {t("measurements.subtitle")}

- - - - - - - {t("measurements.addMeasurement")} - - setDialogOpen(false)} - onCancel={() => setDialogOpen(false)} - /> - - + + + setDialogOpen(false)} + onCancel={() => setDialogOpen(false)} + /> + + setDialogOpen(true)} /> ); diff --git a/src/app/mood/page.tsx b/src/app/mood/page.tsx index 38f0e0ad2..3aa6001c0 100644 --- a/src/app/mood/page.tsx +++ b/src/app/mood/page.tsx @@ -5,13 +5,7 @@ import { useAuth } from "@/hooks/use-auth"; import { MoodForm } from "@/components/mood/mood-form"; import { MoodList } from "@/components/mood/mood-list"; import { Button } from "@/components/ui/button"; -import { - Dialog, - DialogContent, - DialogHeader, - DialogTitle, - DialogTrigger, -} from "@/components/ui/dialog"; +import { ResponsiveSheet } from "@/components/ui/responsive-sheet"; import { Plus, Loader2 } from "lucide-react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; @@ -48,25 +42,23 @@ export default function MoodPage() { {t("mood.subtitle")}

- - - - - - - {t("mood.addEntry")} - - setDialogOpen(false)} - onCancel={() => setDialogOpen(false)} - /> - - + + + setDialogOpen(false)} + onCancel={() => setDialogOpen(false)} + /> + + setDialogOpen(true)} /> ); diff --git a/src/app/page.tsx b/src/app/page.tsx index f3d9a7ed5..37e52b3c3 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -26,12 +26,7 @@ import type { DataSummary as DataSummaryType } from "@/lib/analytics/trends"; import dynamic from "next/dynamic"; import { Button } from "@/components/ui/button"; import { EmptyState } from "@/components/ui/empty-state"; -import { - Dialog, - DialogContent, - DialogHeader, - DialogTitle, -} from "@/components/ui/dialog"; +import { ResponsiveSheet } from "@/components/ui/responsive-sheet"; import { DropdownMenu, DropdownMenuContent, @@ -523,35 +518,27 @@ export default function DashboardPage() { * line is free for established users. */} - {/* Quick Entry Dialogs */} - !open && setQuickEntryDialog(null)} + title={t("measurements.addMeasurement")} > - - - {t("measurements.addMeasurement")} - - setQuickEntryDialog(null)} - onCancel={() => setQuickEntryDialog(null)} - /> - - - setQuickEntryDialog(null)} + onCancel={() => setQuickEntryDialog(null)} + /> + + !open && setQuickEntryDialog(null)} + title={t("mood.addEntry")} > - - - {t("mood.addEntry")} - - setQuickEntryDialog(null)} - onCancel={() => setQuickEntryDialog(null)} - /> - - + setQuickEntryDialog(null)} + onCancel={() => setQuickEntryDialog(null)} + /> + {(() => { type TrendEntry = { id: string; order: number; node: React.ReactNode };