mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
chore(react/ribbon): fix some more crashes when rapidly switching tabs
This commit is contained in:
@@ -544,7 +544,7 @@ export function useWindowSize() {
|
|||||||
|
|
||||||
window.addEventListener("resize", onResize);
|
window.addEventListener("resize", onResize);
|
||||||
return () => window.removeEventListener("resize", onResize);
|
return () => window.removeEventListener("resize", onResize);
|
||||||
});
|
}, []);
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default function EditedNotesTab({ note }: TabContext) {
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
overflow: "auto"
|
overflow: "auto"
|
||||||
}}>
|
}}>
|
||||||
{editedNotes ? (
|
{editedNotes?.length ? (
|
||||||
<div className="edited-notes-list use-tn-links">
|
<div className="edited-notes-list use-tn-links">
|
||||||
{joinElements(editedNotes.map(editedNote => {
|
{joinElements(editedNotes.map(editedNote => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export default function NotePathsTab({ note, hoistedNoteId, notePath }: TabConte
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="note-paths-widget">
|
<div class="note-paths-widget">
|
||||||
{sortedNotePaths && (
|
{sortedNotePaths?.length && (
|
||||||
<>
|
<>
|
||||||
<div className="note-path-intro">
|
<div className="note-path-intro">
|
||||||
{sortedNotePaths.length > 0 ? t("note_paths.intro_placed") : t("note_paths.intro_not_placed")}
|
{sortedNotePaths.length > 0 ? t("note_paths.intro_placed") : t("note_paths.intro_not_placed")}
|
||||||
|
|||||||
Reference in New Issue
Block a user