fix(react/note_title): not refreshing on protected session

This commit is contained in:
Elian Doran
2025-08-21 12:13:30 +03:00
parent be576176c5
commit 033e90f8b7
2 changed files with 18 additions and 8 deletions

View File

@@ -12,10 +12,10 @@ export default function NoteTitleWidget() {
const title = useNoteProperty(note, "title", componentId);
const isProtected = useNoteProperty(note, "isProtected");
const newTitle = useRef("");
const [ isReadOnly, setReadOnly ] = useState<boolean>(false);
const [ navigationTitle, setNavigationTitle ] = useState<string | null>(null);
useEffect(() => {
const isReadOnly = note === null
|| note === undefined
@@ -23,7 +23,7 @@ export default function NoteTitleWidget() {
|| isLaunchBarConfig(note.noteId)
|| viewScope?.viewMode !== "default";
setReadOnly(isReadOnly);
}, [ note?.noteId, note?.isProtected, viewScope?.viewMode ]);
}, [ note, note?.noteId, note?.isProtected, viewScope?.viewMode ]);
useEffect(() => {
if (isReadOnly) {