From 3d4b740e5a512db8fbdd934af2fbc9585fa00f0f Mon Sep 17 00:00:00 2001 From: polwex Date: Thu, 15 May 2025 18:47:59 +0700 Subject: thanks gemini, very pretty --- src/pages/test/index.tsx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/pages/test/index.tsx (limited to 'src/pages/test/index.tsx') diff --git a/src/pages/test/index.tsx b/src/pages/test/index.tsx new file mode 100644 index 0000000..35ce5db --- /dev/null +++ b/src/pages/test/index.tsx @@ -0,0 +1,34 @@ +// This is a Server Component by default +import ProductDetailsServer from "./product-details-server"; +import TriggerModalButton from "./trigger-modal-button"; // We'll make this a client component to manage state + +export default function SomePage() { + const productIdForModal = "123"; // Or get this dynamically + + return ( +
+

+ Modal with Server Component Content +

+

+ This page demonstrates opening a modal whose content is rendered by a + Server Component. The modal shell (open/close logic) is a Client + Component. +

+ + {/* + The TriggerModalButton will manage the modal's open/close state. + It will receive the Server Component as a child to pass to ClientModal. + */} + + + + +
+

Other content on the page...

+
+
+ ); +} -- cgit v1.2.3