diff --git a/src/components/DeletePlanConfirmationResponsiveDialog.tsx b/src/components/DeletePlanConfirmationResponsiveDialog.tsx
new file mode 100644
index 0000000..7689473
--- /dev/null
+++ b/src/components/DeletePlanConfirmationResponsiveDialog.tsx
@@ -0,0 +1,97 @@
+import * as React from "react";
+
+import { Button } from "@/components/ui/button";
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from "@/components/ui/dialog";
+import {
+ Drawer,
+ DrawerContent,
+ DrawerHeader,
+ DrawerTitle,
+ DrawerTrigger,
+} from "@/components/ui/drawer";
+import { useMediaQuery } from "@/lib/useMediaQuery";
+
+export const DeletePlanConfirmationResponsiveDialog = ({
+ deletePlan,
+}: {
+ deletePlan: () => void;
+}) => {
+ const [open, setOpen] = React.useState(false);
+ const isDesktop = useMediaQuery("(min-width: 768px)");
+ const closeDialog = () => {
+ setOpen(false);
+ };
+ if (isDesktop) {
+ return (
+
+ );
+ }
+
+ return (
+
+
+
+
+
+
+ Czy na pewno chcesz usunąć plan
+
+
+
+
+ );
+};
+
+function DeletePlan({
+ deletePlan,
+ closeDialog,
+}: {
+ deletePlan: () => void;
+ closeDialog: () => void;
+}) {
+ return (
+
+
+
+
+ );
+}
diff --git a/src/components/Plan.tsx b/src/components/Plan.tsx
index ec46c6b..d2f7fcf 100644
--- a/src/components/Plan.tsx
+++ b/src/components/Plan.tsx
@@ -13,6 +13,7 @@ import { cn } from "@/lib/utils";
import { planFamily } from "@/pages/createplan/[id]";
import { plansIds } from "@/pages/plans";
+import { DeletePlanConfirmationResponsiveDialog } from "./DeletePlanConfirmationResponsiveDialog";
import { buttonVariants } from "./ui/button";
export const Plan = ({ id, name }: { id: string; name: string }) => {
@@ -60,12 +61,7 @@ export const Plan = ({ id, name }: { id: string; name: string }) => {
>
Kopiuj
-
+
diff --git a/src/pages/app/plans.tsx b/src/pages/app/plans.tsx
index fb440c8..fb5fc08 100644
--- a/src/pages/app/plans.tsx
+++ b/src/pages/app/plans.tsx
@@ -7,7 +7,7 @@ import { planFamily } from "@/atoms/planFamily";
import { Plan } from "@/components/Plan";
import { Seo } from "@/components/SEO";
import { SolvroLogo } from "@/components/SolvroLogo";
-import { buttonVariants } from "@/components/ui/button";
+import { Button, buttonVariants } from "@/components/ui/button";
import { cn } from "@/lib/utils";
export const plansIds = atomWithStorage>("plansIds", []);
@@ -61,12 +61,9 @@ const Plans = () => {
-
+
+
+
{plans.map((plan) => (
))}