diff --git a/src/lib/stores/entriesStore.svelte.js b/src/lib/stores/entriesStore.svelte.js
index 02f0983..9db6c05 100644
--- a/src/lib/stores/entriesStore.svelte.js
+++ b/src/lib/stores/entriesStore.svelte.js
@@ -27,7 +27,7 @@ export function initEntriesListener(uid) {
}
export async function addEntry(data) {
- if (!_uid) return null;
+ if (!_uid) throw new Error('Not logged in');
const ref = await addDoc(collection(db, 'users', _uid, 'entries'), {
...data,
createdAt: serverTimestamp(),
diff --git a/src/lib/timeline/NewEntryForm.svelte b/src/lib/timeline/NewEntryForm.svelte
index 07c661c..102cbdb 100644
--- a/src/lib/timeline/NewEntryForm.svelte
+++ b/src/lib/timeline/NewEntryForm.svelte
@@ -1,5 +1,4 @@
@@ -153,6 +162,7 @@
+ {#if saveError}{saveError}{/if}
{/if}
@@ -326,6 +336,7 @@
}
.save-btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.save-btn:disabled { opacity: 0.6; cursor: not-allowed; }
+ .save-err { font-size: 12px; color: #ef4444; margin-top: 4px; display: block; text-align: right; }
/* scroll + form */
.scroll { flex: 1; overflow-y: auto; }