diff --git a/frontend/src/components/common/note-loading-boundary/hooks/use-load-note-from-server.ts b/frontend/src/components/common/note-loading-boundary/hooks/use-load-note-from-server.ts index 85a0809af..6d566e352 100644 --- a/frontend/src/components/common/note-loading-boundary/hooks/use-load-note-from-server.ts +++ b/frontend/src/components/common/note-loading-boundary/hooks/use-load-note-from-server.ts @@ -14,7 +14,7 @@ import type { AsyncState } from 'react-use/lib/useAsyncFn' * * @return An {@link AsyncState async state} that represents the current state of the loading process. */ -export const useLoadNoteFromServer = (): [AsyncState, () => void] => { +export const useLoadNoteFromServer = (): [AsyncState, () => void] => { const id = useSingleStringUrlParameter('noteId', undefined) return useAsyncFn(async () => { @@ -23,5 +23,6 @@ export const useLoadNoteFromServer = (): [AsyncState, () => void] => { } const noteFromServer = await getNote(id) setNoteDataFromServer(noteFromServer) + return true }, [id]) } diff --git a/frontend/src/components/common/user-avatar/user-avatar-for-username.tsx b/frontend/src/components/common/user-avatar/user-avatar-for-username.tsx index a778fecbb..a4a26329e 100644 --- a/frontend/src/components/common/user-avatar/user-avatar-for-username.tsx +++ b/frontend/src/components/common/user-avatar/user-avatar-for-username.tsx @@ -38,13 +38,9 @@ export const UserAvatarForUsername: React.FC = ({ us } }, [username, t]) - if (!value) { - return null - } - return ( - - + + ) } diff --git a/frontend/src/components/editor-page/document-bar/revisions/revision-list.tsx b/frontend/src/components/editor-page/document-bar/revisions/revision-list.tsx index c85b73561..ace3a2926 100644 --- a/frontend/src/components/editor-page/document-bar/revisions/revision-list.tsx +++ b/frontend/src/components/editor-page/document-bar/revisions/revision-list.tsx @@ -55,7 +55,7 @@ export const RevisionList: React.FC = ({ selectedRevisionId, }, [loading, onRevisionSelect, revisions, selectedRevisionId]) return ( - + {revisionList} ) diff --git a/frontend/src/components/editor-page/document-bar/revisions/revision-viewer.tsx b/frontend/src/components/editor-page/document-bar/revisions/revision-viewer.tsx index 03c2a9804..f3fed0d1f 100644 --- a/frontend/src/components/editor-page/document-bar/revisions/revision-viewer.tsx +++ b/frontend/src/components/editor-page/document-bar/revisions/revision-viewer.tsx @@ -51,7 +51,7 @@ export const RevisionViewer: React.FC = ({ selectedRevision } return ( - + { }, [error]) return ( - + = ({ code }) => { }, [code, abcLib]) return ( - + diff --git a/frontend/src/extensions/extra-integrations/flowchart/flowchart.tsx b/frontend/src/extensions/extra-integrations/flowchart/flowchart.tsx index 8e0434abc..12dfe36c4 100644 --- a/frontend/src/extensions/extra-integrations/flowchart/flowchart.tsx +++ b/frontend/src/extensions/extra-integrations/flowchart/flowchart.tsx @@ -70,7 +70,7 @@ export const FlowChart: React.FC = ({ code }) => { }, [code, darkModeActivated, flowchartLib]) return ( - + diff --git a/frontend/src/extensions/extra-integrations/graphviz/graphviz-frame.tsx b/frontend/src/extensions/extra-integrations/graphviz/graphviz-frame.tsx index 0233fee58..3da421078 100644 --- a/frontend/src/extensions/extra-integrations/graphviz/graphviz-frame.tsx +++ b/frontend/src/extensions/extra-integrations/graphviz/graphviz-frame.tsx @@ -61,7 +61,7 @@ export const GraphvizFrame: React.FC = ({ code }) => { }, [code, basePath, showError, graphvizImport]) return ( - + {error} diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code.tsx b/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code.tsx index 8b4cc81d5..2b92ad9aa 100644 --- a/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code.tsx +++ b/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code.tsx @@ -36,7 +36,7 @@ export const HighlightedCode: React.FC = ({ code, language const wrappedDomLines = useAttachLineNumbers(codeDom, startLineNumber) return ( - +
= ({ code }) => { }, [renderingError]) return ( - + diff --git a/frontend/src/pages/new.tsx b/frontend/src/pages/new.tsx index 938427f5a..86e24c13b 100644 --- a/frontend/src/pages/new.tsx +++ b/frontend/src/pages/new.tsx @@ -24,7 +24,7 @@ export const NewNotePage: NextPage = () => { return ( } errorComponent={