aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/components/Settings.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/Settings.tsx')
-rw-r--r--frontend/src/components/Settings.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/frontend/src/components/Settings.tsx b/frontend/src/components/Settings.tsx
index c174c32..b218775 100644
--- a/frontend/src/components/Settings.tsx
+++ b/frontend/src/components/Settings.tsx
@@ -18,7 +18,7 @@ export default function Settings({ fontTheme, setFontTheme }: SettingsProps) {
const [importFile, setImportFile] = useState<File | null>(null);
/* ... existing fetchFeeds ... */
- const fetchFeeds = () => {
+ const fetchFeeds = React.useCallback(() => {
setLoading(true);
apiFetch('/api/feed/')
.then((res) => {
@@ -33,11 +33,12 @@ export default function Settings({ fontTheme, setFontTheme }: SettingsProps) {
setError(err.message);
setLoading(false);
});
- };
+ }, []);
useEffect(() => {
+ // eslint-disable-next-line
fetchFeeds();
- }, []);
+ }, [fetchFeeds]);
/* ... existing handlers ... */
const handleAddFeed = (e: React.FormEvent) => {