auto-cleanup implemented
This commit is contained in:
@@ -60,6 +60,15 @@ export const Layout: Component<LayoutProps> = (props) => {
|
||||
}
|
||||
});
|
||||
|
||||
createEffect(() => {
|
||||
const noteId = selectedNoteId();
|
||||
if (!noteId) return;
|
||||
const noteExists = store.notes.some(note => note.id === noteId);
|
||||
if (!noteExists) {
|
||||
setSelectedNoteId(null);
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<div class="flex h-screen w-full min-w-0 bg-background overflow-hidden relative font-sans antialiased text-foreground">
|
||||
{/* Desktop UI Container */}
|
||||
|
||||
Reference in New Issue
Block a user