Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat: add shared storage

Marc Seitz78f858e35f0f
diff --git a/app/(static)/deck/page.tsx b/app/(static)/deck/page.tsx
new file mode 100644
index 00000000..606f4e13
--- /dev/null
+++ b/app/(static)/deck/page.tsx
@@ -0,0 +1,58 @@
+"use client"; // Ensures this component is rendered on the client side
+
+import { useEffect, useRef } from "react";
+
+const DeckPage = () => {
+ const iframeRef = useRef<HTMLIFrameElement>(null);
+
+ const setItem = (key: string, value: string) => {
+ iframeRef.current?.contentWindow?.postMessage(
+ { type: "set", key, value },
+ "https://shared.mfts.dev",
+ );
+ };
+
+ useEffect(() => {
+ // Example usage
+ const exampleData = JSON.stringify({
+ company: "Papermark",
+ email: "[email protected]",
+ description:
+ "Papermark is a platform that helps you create and share beautiful pitch decks.",
+ problem:
+ "Creating pitch decks is time-consuming and requires design skills.",
+ solution:
+ "Papermark provides a simple drag-and-drop interface to create beautiful pitch decks.",
+ mrr: "10,000",
+ users: "100",
+ metric2: "10",
+ budget: "10,000",
+ community: "Papermark Community",
+ community1: "Papermark Community",
+ special1: "Special 1",
+ special2: "Special 2",
+ });
+ setItem("sharedKey", exampleData);
+ }, []);
+
+ return (
+ <>
+ <iframe
+ ref={iframeRef}
+ src="https://shared.mfts.dev"
+ style={{
+ width: 0,
+ height: 0,
+ border: "none",
+ position: "absolute",
+ }}
+ />
+ <div>
+ <h1>Deck Page</h1>
+ <p>This page sets a localStorage value in the shared iframe.</p>
+ </div>
+ </>
+ );
+};
+
+export default DeckPage;