fix: notes page fetches domains on mount for domain name resolution

This commit is contained in:
2026-07-28 13:54:18 +00:00
parent 640994c9c1
commit 80834ef121
+3 -3
View File
@@ -80,14 +80,14 @@ export default function NotesPage() {
const saveTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
const saveVersion = useRef(0);
useEffect(() => {
useEffect(() => { fetchDomains();
fetchNotes();
return () => {
if (saveTimer.current) clearTimeout(saveTimer.current);
};
}, []);
useEffect(() => {
useEffect(() => { fetchDomains();
if (new URLSearchParams(window.location.search).get('new') !== 'true' || createdFromQuery.current) return;
createdFromQuery.current = true;
createNote().finally(() => window.history.replaceState(null, '', '/notes'));
@@ -95,7 +95,7 @@ export default function NotesPage() {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
useEffect(() => {
useEffect(() => { fetchDomains();
if (selectedNote) {
fetchBacklinks(selectedNote.id);
}