diff --git a/apps/client/src/widgets/collections/presentation/index.tsx b/apps/client/src/widgets/collections/presentation/index.tsx index eada2b14e..24b59c047 100644 --- a/apps/client/src/widgets/collections/presentation/index.tsx +++ b/apps/client/src/widgets/collections/presentation/index.tsx @@ -1,5 +1,15 @@ +import { useEffect, useRef, useState } from "preact/hooks"; import { ViewModeProps } from "../interface"; +import { buildPresentation } from "./slide_builder"; -export default function PresentationView({ }: ViewModeProps<{}>) { - return

Presentation goes here.

; +export default function PresentationView({ note }: ViewModeProps<{}>) { + + const containerRef = useRef(null); + + useEffect(() => { + const presentationEl = buildPresentation(note.noteId); + containerRef.current?.replaceChildren(presentationEl); + }, [ note ]); + + return
; } diff --git a/apps/client/src/widgets/collections/presentation/slide_builder.ts b/apps/client/src/widgets/collections/presentation/slide_builder.ts new file mode 100644 index 000000000..1bcc63117 --- /dev/null +++ b/apps/client/src/widgets/collections/presentation/slide_builder.ts @@ -0,0 +1,5 @@ +export function buildPresentation(parentNoteId: string) { + const p = document.createElement("p"); + p.innerHTML = "Hello world"; + return p; +}