From be0883713dd48064abc41a423960530c057d65e8 Mon Sep 17 00:00:00 2001 From: Shotaro Nakamura <79000684+nakasyou@users.noreply.github.com> Date: Sun, 27 Aug 2023 12:02:04 +0900 Subject: [PATCH] Update index.tsx --- src/app/note/index.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/note/index.tsx b/src/app/note/index.tsx index b7832abf..bf932768 100644 --- a/src/app/note/index.tsx +++ b/src/app/note/index.tsx @@ -16,7 +16,14 @@ import type { Editor } from "@tiptap/react" export interface Props { } -export const ModeContext = createContext<"edit" | "play">('edit') +export const UserStateContext = createContext<{ + mode: "edit" | "play", + isView: boolean +}>({ + mode: 'edit', + isView: true, +}) + export default function(props: Props){ const [mode, setMode] = useState<"edit" | "play">("edit") @@ -63,7 +70,10 @@ export default function(props: Props){