Skip to content

Commit

Permalink
20字以降カット
Browse files Browse the repository at this point in the history
  • Loading branch information
nakasyou committed Jul 20, 2024
1 parent c1affa9 commit 4090fe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/islands/ai-quiz/components/Navbar.qwik.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ const Settings = component$(() => {
typeof screenState.note === 'string' ? '読み込み中' : <div>
{
screenState.note!.notes.map((note) => {
const text = new DOMParser().parseFromString(note.canToJsonData.html, 'text/html').documentElement.textContent
const text = new DOMParser().parseFromString(note.canToJsonData.html, 'text/html').documentElement.textContent ?? '空のノート'
return <label key={note.id}>
<div class="flex">
<input type="checkbox" />
<div>
{text}
{text?.length > 20 ? `${text.substring(0, 20)}...` : text}
</div>
</div>
</label>
Expand Down

0 comments on commit 4090fe9

Please sign in to comment.