mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-24 15:48:16 +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();
|
const userFromAuth = AuthService.getUser();
|
||||||
if (userFromAuth) {
|
if (userFromAuth) {
|
||||||
setUser(userFromAuth);
|
setUser(userFromAuth);
|
||||||
loadNotes();
|
loadNotes(); // Will use current showArchived state
|
||||||
loadTodos();
|
loadTodos();
|
||||||
loadRssFeeds();
|
loadRssFeeds();
|
||||||
loadRssArticles();
|
loadRssArticles();
|
||||||
@@ -269,7 +269,14 @@ const Index = () => {
|
|||||||
} else {
|
} else {
|
||||||
navigate("/login");
|
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
|
// Auto-refresh des articles RSS toutes les 2 minutes
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -296,7 +303,7 @@ const Index = () => {
|
|||||||
|
|
||||||
const loadNotes = async () => {
|
const loadNotes = async () => {
|
||||||
try {
|
try {
|
||||||
const fetchedNotes = await NotesService.getNotes();
|
const fetchedNotes = await NotesService.getNotes(showArchived);
|
||||||
if (Array.isArray(fetchedNotes)) {
|
if (Array.isArray(fetchedNotes)) {
|
||||||
setNotes(fetchedNotes);
|
setNotes(fetchedNotes);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default function NotesPage() {
|
|||||||
|
|
||||||
const loadNotes = async () => {
|
const loadNotes = async () => {
|
||||||
try {
|
try {
|
||||||
const data = await NotesService.getNotes();
|
const data = await NotesService.getNotes(showArchived);
|
||||||
setNotes(data);
|
setNotes(data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
showError("Erreur lors du chargement des notes");
|
showError("Erreur lors du chargement des notes");
|
||||||
@@ -42,7 +42,7 @@ export default function NotesPage() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
loadNotes();
|
loadNotes();
|
||||||
}, []);
|
}, [showArchived]);
|
||||||
|
|
||||||
// Extract unique tags from all notes
|
// Extract unique tags from all notes
|
||||||
const availableTags: TagOption[] = Array.from(
|
const availableTags: TagOption[] = Array.from(
|
||||||
|
|||||||
Reference in new issue
Block a user