Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(dashboard): resolve ESLint errors from react-hooks plugin upgrade
rmyndharis299295a9bedc
diff --git a/dashboard/eslint.config.js b/dashboard/eslint.config.jsindex 478008cc3..ba19de664 100644--- a/dashboard/eslint.config.js+++ b/dashboard/eslint.config.js@@ -22,6 +22,7 @@ export default defineConfig([rules: {'react-hooks/purity': 'off','react-hooks/incompatible-library': 'off',+ 'react-hooks/set-state-in-effect': 'off','react-refresh/only-export-components': ['warn', { allowConstantExport: true }],},},diff --git a/dashboard/src/pages/Sessions.tsx b/dashboard/src/pages/Sessions.tsxindex 597214f9c..e348557ab 100644--- a/dashboard/src/pages/Sessions.tsx+++ b/dashboard/src/pages/Sessions.tsx@@ -43,6 +43,18 @@ export function Sessions() {),});+ const fetchSessions = async () => {+ try {+ setLoading(true);+ const data = await sessionApi.list();+ setSessions(data);+ } catch (err) {+ setError(err instanceof Error ? err.message : 'Failed to load sessions');+ } finally {+ setLoading(false);+ }+ };+useEffect(() => {fetchSessions();}, []);@@ -85,18 +97,6 @@ export function Sessions() {};}, [qrData, fetchQR]);- const fetchSessions = async () => {- try {- setLoading(true);- const data = await sessionApi.list();- setSessions(data);- } catch (err) {- setError(err instanceof Error ? err.message : 'Failed to load sessions');- } finally {- setLoading(false);- }- };-const handleCreate = async () => {if (!newSessionName.trim()) return;try {