From e0273cf9101f334569ab170158eb8211db6e277b Mon Sep 17 00:00:00 2001 From: nakasyou Date: Tue, 20 Aug 2024 18:52:47 +0900 Subject: [PATCH] feat(app): add title --- src/islands/ai-quiz/components/InitialScreen.qwik.tsx | 1 + src/islands/note/App.tsx | 3 +++ src/pages/app/notes/[noteid].astro | 2 +- src/pages/app/notes/[noteid]/quiz.astro | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/islands/ai-quiz/components/InitialScreen.qwik.tsx b/src/islands/ai-quiz/components/InitialScreen.qwik.tsx index a93e52fc..df4a8922 100644 --- a/src/islands/ai-quiz/components/InitialScreen.qwik.tsx +++ b/src/islands/ai-quiz/components/InitialScreen.qwik.tsx @@ -56,6 +56,7 @@ export const InitialScreen = component$(() => { } return } + document.title = `${gotNote.name} - Quiz with Nanoha` const textNotes = loaded.notes.filter( (note): note is TextNoteData => note.type === 'text', ) diff --git a/src/islands/note/App.tsx b/src/islands/note/App.tsx index 0f7870ab..f9987d50 100644 --- a/src/islands/note/App.tsx +++ b/src/islands/note/App.tsx @@ -99,6 +99,9 @@ export default (props: Props) => { } } }) + createEffect(() => { + document.title = `${noteBookMetadata.noteName} - Nanoha` + }) onMount(() => { const url = new URL(location.href) if (url.searchParams.has('play')) { diff --git a/src/pages/app/notes/[noteid].astro b/src/pages/app/notes/[noteid].astro index 4eff9fdc..4dad7745 100644 --- a/src/pages/app/notes/[noteid].astro +++ b/src/pages/app/notes/[noteid].astro @@ -15,7 +15,7 @@ if (/^local\-.+$/.test(noteId)) { } } --- - +