diff --git a/package-lock.json b/package-lock.json
index 8c062ae..6595acb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -25,7 +25,7 @@
"clsx": "^2.0.0",
"lucide-react": "^0.290.0",
"nanoid": "^5.0.4",
- "next": "^14.0.1",
+ "next": "14.0.1",
"next-plausible": "^3.12.0",
"next-themes": "^0.2.1",
"next13-progressbar": "^1.1.1",
@@ -36,6 +36,7 @@
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7",
"uuid": "^9.0.1",
+ "vaul": "^0.7.9",
"zod": "^3.22.4"
},
"devDependencies": {
@@ -6036,6 +6037,18 @@
"uuid": "dist/bin/uuid"
}
},
+ "node_modules/vaul": {
+ "version": "0.7.9",
+ "resolved": "https://registry.npmjs.org/vaul/-/vaul-0.7.9.tgz",
+ "integrity": "sha512-RrcnGOHOq/cEU3YpyyZrnjh0H79xMpF3IrHZs9ichvHlpKjLDc4Vwjn4VkuGzeUGrmQ3wamfm/cpdKWpvBIgQw==",
+ "dependencies": {
+ "@radix-ui/react-dialog": "^1.0.4"
+ },
+ "peerDependencies": {
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ }
+ },
"node_modules/watchpack": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
diff --git a/package.json b/package.json
index 7a4ee22..5e69948 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,7 @@
"clsx": "^2.0.0",
"lucide-react": "^0.290.0",
"nanoid": "^5.0.4",
- "next": "^14.0.1",
+ "next": "14.0.1",
"next-plausible": "^3.12.0",
"next-themes": "^0.2.1",
"next13-progressbar": "^1.1.1",
@@ -37,6 +37,7 @@
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7",
"uuid": "^9.0.1",
+ "vaul": "^0.7.9",
"zod": "^3.22.4"
},
"devDependencies": {
diff --git a/src/app/groups/[groupId]/@modal/expense-modal.tsx b/src/app/groups/[groupId]/@modal/expense-modal.tsx
index 587af39..c54a78f 100644
--- a/src/app/groups/[groupId]/@modal/expense-modal.tsx
+++ b/src/app/groups/[groupId]/@modal/expense-modal.tsx
@@ -6,26 +6,28 @@ import {
DialogTitle,
} from '@/components/ui/dialog'
import { useRouter } from 'next/navigation'
-import { ReactNode, useState } from 'react'
+import { ReactNode, useEffect, useState } from 'react'
+import { Drawer } from 'vaul'
-export function ExpenseModal({
- children,
- title,
-}: {
+type Props = {
children: ReactNode
title: ReactNode
-}) {
+}
+
+export function ExpenseModal(props: Props) {
+ const size = useTailwindBreakpoint()
+ if (size === 'xs') {
+ return
+ } else {
+ return
+ }
+}
+
+export function ExpenseDialog({ children, title }: Props) {
const router = useRouter()
- const [open, setOpen] = useState(true)
return (
-