mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-11 17:29:37 +02:00
Merge pull request #152 from R0m1k3/antigravity
feat: implement core application dashboard with notes, todos, RSS, ca…
This commit is contained in:
2 files changed
+12
-5
No files matched your search
+10
-3
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user