Merge pull request #152 from R0m1k3/antigravity

feat: implement core application dashboard with notes, todos, RSS, ca…
This commit is contained in:
LogiFlow authored and GitHub committed 2025-12-08 08:46:39 +01:00
commit c32247de47
2 files changed
+12 -5

No files matched your search

+10 -3
View File
@@ -261,7 +261,7 @@ const Index = () => {
const userFromAuth = AuthService.getUser();
if (userFromAuth) {
setUser(userFromAuth);
loadNotes();
loadNotes(); // Will use current showArchived state
loadTodos();
loadRssFeeds();
loadRssArticles();
@@ -269,7 +269,14 @@ const Index = () => {
} else {
navigate("/login");
}
}, [navigate]);
}, [navigate]); // Keep this for auth check
// Reload notes when showArchived changes
useEffect(() => {
if (user) {
loadNotes();
}
}, [showArchived]);
// Auto-refresh des articles RSS toutes les 2 minutes
useEffect(() => {
@@ -296,7 +303,7 @@ const Index = () => {
const loadNotes = async () => {
try {
const fetchedNotes = await NotesService.getNotes();
const fetchedNotes = await NotesService.getNotes(showArchived);
if (Array.isArray(fetchedNotes)) {
setNotes(fetchedNotes);
}
+2 -2
View File
@@ -33,7 +33,7 @@ export default function NotesPage() {
const loadNotes = async () => {
try {
const data = await NotesService.getNotes();
const data = await NotesService.getNotes(showArchived);
setNotes(data);
} catch (error) {
showError("Erreur lors du chargement des notes");
@@ -42,7 +42,7 @@ export default function NotesPage() {
useEffect(() => {
loadNotes();
}, []);
}, [showArchived]);
// Extract unique tags from all notes
const availableTags: TagOption[] = Array.from(