diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx index ad08893e1..042163531 100644 --- a/apps/client/src/widgets/react/hooks.tsx +++ b/apps/client/src/widgets/react/hooks.tsx @@ -544,7 +544,7 @@ export function useWindowSize() { window.addEventListener("resize", onResize); return () => window.removeEventListener("resize", onResize); - }); + }, []); return size; } diff --git a/apps/client/src/widgets/ribbon/EditedNotesTab.tsx b/apps/client/src/widgets/ribbon/EditedNotesTab.tsx index ce7bcfc19..5bab1c816 100644 --- a/apps/client/src/widgets/ribbon/EditedNotesTab.tsx +++ b/apps/client/src/widgets/ribbon/EditedNotesTab.tsx @@ -27,7 +27,7 @@ export default function EditedNotesTab({ note }: TabContext) { width: "100%", overflow: "auto" }}> - {editedNotes ? ( + {editedNotes?.length ? (
{joinElements(editedNotes.map(editedNote => { return ( diff --git a/apps/client/src/widgets/ribbon/NotePathsTab.tsx b/apps/client/src/widgets/ribbon/NotePathsTab.tsx index 469f32430..dfbe38079 100644 --- a/apps/client/src/widgets/ribbon/NotePathsTab.tsx +++ b/apps/client/src/widgets/ribbon/NotePathsTab.tsx @@ -29,7 +29,7 @@ export default function NotePathsTab({ note, hoistedNoteId, notePath }: TabConte return (
- {sortedNotePaths && ( + {sortedNotePaths?.length && ( <>
{sortedNotePaths.length > 0 ? t("note_paths.intro_placed") : t("note_paths.intro_not_placed")}