Skip to content

Commit c772430

Browse files
committed
fix(type_widgets): switching between note types shows wrong content
1 parent d4194c5 commit c772430

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/client/src/widgets/NoteDetail.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,12 @@ export default function NoteDetail() {
193193
ref={containerRef}
194194
class={`note-detail ${isFullHeight ? "full-height" : ""}`}
195195
>
196-
{Object.entries(noteTypesToRender.current).map(([ type, Element ]) => {
196+
{Object.entries(noteTypesToRender.current).map(([ itemType, Element ]) => {
197197
return <NoteDetailWrapper
198198
Element={Element}
199-
key={type}
200-
type={type as ExtendedNoteType}
201-
isVisible={activeNoteType === type}
199+
key={itemType}
200+
type={itemType as ExtendedNoteType}
201+
isVisible={type === itemType}
202202
isFullHeight={isFullHeight}
203203
props={props}
204204
/>

0 commit comments

Comments
 (0)