From ec15d20abac65bfda6c8e6396ce9fc2061f5067a Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Wed, 24 Apr 2024 14:52:57 +0100 Subject: ui(web): Show bookmark URL when maximizing a bookmark --- .../@modal/(.)preview/[bookmarkId]/page.tsx | 35 ++++++++++++++++++++++ .../app/dashboard/@modal/[...catchAll]/page.tsx | 3 ++ apps/web/app/dashboard/@modal/default.tsx | 3 ++ 3 files changed, 41 insertions(+) create mode 100644 apps/web/app/dashboard/@modal/(.)preview/[bookmarkId]/page.tsx create mode 100644 apps/web/app/dashboard/@modal/[...catchAll]/page.tsx create mode 100644 apps/web/app/dashboard/@modal/default.tsx (limited to 'apps/web/app/dashboard/@modal') diff --git a/apps/web/app/dashboard/@modal/(.)preview/[bookmarkId]/page.tsx b/apps/web/app/dashboard/@modal/(.)preview/[bookmarkId]/page.tsx new file mode 100644 index 00000000..432e7a6c --- /dev/null +++ b/apps/web/app/dashboard/@modal/(.)preview/[bookmarkId]/page.tsx @@ -0,0 +1,35 @@ +"use client"; + +import { useState } from "react"; +import { useRouter } from "next/navigation"; +import BookmarkPreview from "@/components/dashboard/preview/BookmarkPreview"; +import { Dialog, DialogContent } from "@/components/ui/dialog"; + +export default function BookmarkPreviewPage({ + params, +}: { + params: { bookmarkId: string }; +}) { + const router = useRouter(); + + const [open, setOpen] = useState(true); + + const setOpenWithRouter = (value: boolean) => { + setOpen(value); + if (!value) { + router.back(); + } + }; + + return ( + + e.preventDefault()} + > + + + + ); +} diff --git a/apps/web/app/dashboard/@modal/[...catchAll]/page.tsx b/apps/web/app/dashboard/@modal/[...catchAll]/page.tsx new file mode 100644 index 00000000..1fd97c20 --- /dev/null +++ b/apps/web/app/dashboard/@modal/[...catchAll]/page.tsx @@ -0,0 +1,3 @@ +export default function CatchAll() { + return null; +} diff --git a/apps/web/app/dashboard/@modal/default.tsx b/apps/web/app/dashboard/@modal/default.tsx new file mode 100644 index 00000000..6ddf1b76 --- /dev/null +++ b/apps/web/app/dashboard/@modal/default.tsx @@ -0,0 +1,3 @@ +export default function Default() { + return null; +} -- cgit v1.2.3-70-g09d2