diff --git a/web/src/icons/copy.svg b/web/src/icons/copy.svg
new file mode 100644
index 0000000..c8abe8e
--- /dev/null
+++ b/web/src/icons/copy.svg
@@ -0,0 +1 @@
+
diff --git a/web/src/ui/timeline/menu/ViewSourceModal.tsx b/web/src/ui/timeline/menu/ViewSourceModal.tsx
index 630929a..fa1840d 100644
--- a/web/src/ui/timeline/menu/ViewSourceModal.tsx
+++ b/web/src/ui/timeline/menu/ViewSourceModal.tsx
@@ -15,13 +15,22 @@
// along with this program. If not, see .
import { MemDBEvent } from "@/api/types"
import JSONView from "../../util/JSONView.tsx"
+import CopyIcon from "@/icons/copy.svg?react"
interface ViewSourceModalProps {
evt: MemDBEvent
}
+// TODO: change the copy button's text on copy, without having typescript scream at me.
+// will i need to make a component for the copy button and change its state? hmm
+const copyButtonOnClick = (evt: MemDBEvent) => {
+ navigator.clipboard.writeText(JSON.stringify(evt, null, 4))
+}
+
+// TODO check with tulir that he in fact uses material design icons. i got the copy icon from google's site
const ViewSourceModal = ({ evt }: ViewSourceModalProps) => {
return