diff --git a/eslint.config.mjs b/eslint.config.mjs index e3efc7ca..42450460 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -58,7 +58,6 @@ export default [ } ], 'react-hooks/rules-of-hooks': 'warn', - 'react-hooks/exhaustive-deps': 'warn', '@typescript-eslint/no-unused-vars': [ 'warn', { diff --git a/package.json b/package.json index 675ab551..6fd47c38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ledfx", - "version": "2.0.99-b2", + "version": "2.0.99-b3", "description": "LedFx v2 - BladeMOD", "author": "YeonV aka Blade", "private": true, @@ -111,15 +111,15 @@ "packs": "electron-builder --dir", "dist": "run-script-os", "predist": "node -e \"let pkg=require('./package.json'); pkg.homepage='.'; require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2));\"", - "dist:win32": "set GENERATE_SOURCEMAP=false && react-scripts build && electron-builder --config electron-builder.json -w zip -w portable -w nsis", - "dist:default": "GENERATE_SOURCEMAP=false react-scripts build && electron-builder --config electron-builder.json", + "dist:win32": "set GENERATE_SOURCEMAP=false && set CI=false && react-scripts build && electron-builder --config electron-builder.json -w zip -w portable -w nsis", + "dist:default": "GENERATE_SOURCEMAP=false CI=false react-scripts build && electron-builder --config electron-builder.json", "distsetup": "run-script-os", "predistsetup": "node -e \"let pkg=require('./package.json'); pkg.homepage='.'; require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2));\"", "distsetup:win32": "set GENERATE_SOURCEMAP=false && set MS_STORE=true && react-scripts build && electron-builder --config electron-builder.json -w nsis", "distsetup:default": "GENERATE_SOURCEMAP=false MS_STORE=true react-scripts build && electron-builder --config electron-builder.json", "distcc": "run-script-os", "predistcc": "node -e \"let pkg=require('./package.json'); pkg.homepage='.'; require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2));\"", - "distcc:win32": "set GENERATE_SOURCEMAP=false && react-scripts build && electron-builder", + "distcc:win32": "set GENERATE_SOURCEMAP=false && set CI=false && react-scripts build && electron-builder", "distcc:default": "GENERATE_SOURCEMAP=false react-scripts build && electron-builder", "distall": "run-script-os", "predistall": "set PUBLIC_URL=. && node -e \"let pkg=require('./package.json'); pkg.homepage='.'; require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2));\"", diff --git a/src/App.tsx b/src/App.tsx index 3a3c945b..7ab2ae53 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -29,7 +29,7 @@ export default function App() { const getSchemas = useStore((state) => state.getSchemas) const shutdown = useStore((state) => state.shutdown) const showSnackbar = useStore((state) => state.ui.showSnackbar) - const darkMode = useStore((state) => state.ui.darkMode) + // const darkMode = useStore((state) => state.ui.darkMode) const setCoreParams = useStore((state) => state.setCoreParams) const setCoreStatus = useStore((state) => state.setCoreStatus) @@ -52,7 +52,7 @@ export default function App() { // }, } }), - [darkMode] + [] ) useEffect(() => { @@ -65,6 +65,7 @@ export default function App() { initFrontendConfig() console.info( + // eslint-disable-next-line no-useless-concat '%c Ledfx ' + '%c\n ReactApp by Blade ', 'padding: 10px 40px; color: #ffffff; border-radius: 5px 5px 0 0; background-color: #800000;', 'background: #fff; color: #800000; border-radius: 0 0 5px 5px;padding: 5px 0;' @@ -121,7 +122,7 @@ export default function App() { return () => { document.removeEventListener('show_message', handleWebsockets) } - }, []) + }, [showSnackbar]) useEffect(() => { if (protoCall !== '') { @@ -152,7 +153,7 @@ export default function App() { } setProtoCall('') } - }, [protoCall, showSnackbar]) + }, [protoCall, showSnackbar, setProtoCall]) return ( diff --git a/src/components/Bars/BarMessage.tsx b/src/components/Bars/BarMessage.tsx index 634d7bad..091fd32b 100644 --- a/src/components/Bars/BarMessage.tsx +++ b/src/components/Bars/BarMessage.tsx @@ -17,7 +17,7 @@ const MessageBar = () => { if (typeof message === 'string' && message.startsWith('Created Virtual ')) { setCurrentVirtual(message.replace('Created Virtual ', '')) } - }, [message]) + }, [message, setCurrentVirtual]) return ( { useEffect(() => { setIsLogged(!!localStorage.getItem('jwt')) - }, [pathname]) + }, [pathname, setIsLogged]) const getUpdateInfo = useStore((state) => state.getUpdateInfo) @@ -295,7 +295,7 @@ const TopBar = () => { } checkForUpdates() - }, [updateNotificationInterval]) + }, [updateNotificationInterval, getUpdateInfo, latestTag]) useEffect(() => { const latest = async () => { @@ -306,6 +306,7 @@ const TopBar = () => { return resp.tag_name as string } latest().then((r) => r !== latestTag && setLatestTag(r)) + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useEffect(() => { @@ -326,6 +327,7 @@ const TopBar = () => { return () => { document.removeEventListener('disconnected', handleDisconnect) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( diff --git a/src/components/Dialogs/AboutDialog.tsx b/src/components/Dialogs/AboutDialog.tsx index 9c72ee87..7f220bfc 100644 --- a/src/components/Dialogs/AboutDialog.tsx +++ b/src/components/Dialogs/AboutDialog.tsx @@ -62,7 +62,8 @@ export default function AboutDialog({ className, children, startIcon }: any) { if (open) { fetchData() - } + } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [open]) return ( diff --git a/src/components/Dialogs/AddVirtualDialog.tsx b/src/components/Dialogs/AddVirtualDialog.tsx index a7709c7a..bedc9389 100644 --- a/src/components/Dialogs/AddVirtualDialog.tsx +++ b/src/components/Dialogs/AddVirtualDialog.tsx @@ -112,6 +112,7 @@ const AddVirtualDialog = () => { useEffect(() => { handleModelChange(initial.config) + // eslint-disable-next-line react-hooks/exhaustive-deps }, [virtId, initial.config]) return ( diff --git a/src/components/Dialogs/AddWledDialog.tsx b/src/components/Dialogs/AddWledDialog.tsx index 369e0134..606905bc 100644 --- a/src/components/Dialogs/AddWledDialog.tsx +++ b/src/components/Dialogs/AddWledDialog.tsx @@ -110,6 +110,8 @@ const AddWledDialog = () => { }) } + + // eslint-disable-next-line react-hooks/exhaustive-deps const col: GridColDef[] = [ { field: 'name', headerName: 'Name', width: 130 }, { field: 'ip_address', headerName: 'IP', width: 130 } @@ -123,6 +125,7 @@ const AddWledDialog = () => { width: 100 } ], + // eslint-disable-next-line react-hooks/exhaustive-deps [col] ) return ( diff --git a/src/components/Dialogs/EffectTypeDialog.tsx b/src/components/Dialogs/EffectTypeDialog.tsx index 093aab4f..eadfe034 100644 --- a/src/components/Dialogs/EffectTypeDialog.tsx +++ b/src/components/Dialogs/EffectTypeDialog.tsx @@ -66,7 +66,7 @@ const EffectTypeDialog = ({ ) .filter((e: any) => !!e?.value) ], - [groups, formats] + [groups] ) return ( diff --git a/src/components/Dialogs/FrontendPixelsTooSmall.tsx b/src/components/Dialogs/FrontendPixelsTooSmall.tsx index 6b7a200a..367e9fe6 100644 --- a/src/components/Dialogs/FrontendPixelsTooSmall.tsx +++ b/src/components/Dialogs/FrontendPixelsTooSmall.tsx @@ -62,11 +62,13 @@ export default function FrontendPixelsTooSmall() { useEffect(() => { getSystemConfig() + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useEffect(() => { getSystemConfig() setPixelLength(fPixels) + // eslint-disable-next-line react-hooks/exhaustive-deps }, [fPixels]) return ( diff --git a/src/components/Dialogs/HostManager.tsx b/src/components/Dialogs/HostManager.tsx index fc11dbc8..4df9c7ae 100644 --- a/src/components/Dialogs/HostManager.tsx +++ b/src/components/Dialogs/HostManager.tsx @@ -83,6 +83,7 @@ export default function HostManager() { useEffect(() => { if (storedURL) setHostvalue(storedURL) if (storedURLs) setHosts(storedURLs) + // eslint-disable-next-line react-hooks/exhaustive-deps }, [storedURL, setHosts]) useEffect(() => { @@ -101,6 +102,7 @@ export default function HostManager() { // eslint-disable-next-line no-self-assign window.location.href = window.location.href } + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) const runningCores = Object.keys(coreStatus) .filter((h) => coreStatus[h] === 'running') @@ -158,6 +160,7 @@ export default function HostManager() { } getCommonScenes(runningCores).then((res) => setCommonScenes(res)) + // eslint-disable-next-line react-hooks/exhaustive-deps }, [coreStatus, coreParams]) // console.log(commonScenes) const activateCommon = async (scene: string) => { diff --git a/src/components/Dialogs/IntroDialog.tsx b/src/components/Dialogs/IntroDialog.tsx index 0c1e02ee..379726df 100644 --- a/src/components/Dialogs/IntroDialog.tsx +++ b/src/components/Dialogs/IntroDialog.tsx @@ -87,6 +87,7 @@ export default function IntroDialog({ useEffect(() => { getSystemConfig() + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) const [s, setS] = useState({} as Record) @@ -250,6 +251,7 @@ export default function IntroDialog({ ].filter((n: any) => n !== false) setSteps(ste) + // eslint-disable-next-line react-hooks/exhaustive-deps }, [s, graphsMulti, assistant]) return ( diff --git a/src/components/Dialogs/NoHostDialog.tsx b/src/components/Dialogs/NoHostDialog.tsx index db04faba..dfa03db0 100644 --- a/src/components/Dialogs/NoHostDialog.tsx +++ b/src/components/Dialogs/NoHostDialog.tsx @@ -84,6 +84,7 @@ export default function NoHostDialog() { // eslint-disable-next-line no-self-assign window.location.href = window.location.href } + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( diff --git a/src/components/Dialogs/SceneDialogs/EditSceneDialog.tsx b/src/components/Dialogs/SceneDialogs/EditSceneDialog.tsx index 5bb9f52b..e188880d 100644 --- a/src/components/Dialogs/SceneDialogs/EditSceneDialog.tsx +++ b/src/components/Dialogs/SceneDialogs/EditSceneDialog.tsx @@ -85,6 +85,7 @@ const EditSceneDialog = () => { ic.split('image:')[1]?.replaceAll('file:///', '') ) setImageData(result.image) + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useEffect(() => { @@ -219,6 +220,7 @@ const EditSceneDialog = () => { getLedFxPresets().then(setLedFxPresets) getUserPresets().then(setUserPresets) if (open) activateScene(data.name?.toLowerCase().replaceAll(' ', '-')) + // eslint-disable-next-line react-hooks/exhaustive-deps }, [open]) useEffect(() => { @@ -247,6 +249,7 @@ const EditSceneDialog = () => { } }) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) const renderPresets = ( diff --git a/src/components/Gamepad/Gamepad.tsx b/src/components/Gamepad/Gamepad.tsx index bfb0cb66..8ad67f62 100644 --- a/src/components/Gamepad/Gamepad.tsx +++ b/src/components/Gamepad/Gamepad.tsx @@ -218,6 +218,7 @@ const Gamepad = ({ setScene, bottom }: any) => { }) ) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [pad0, pad1, pad2, pad3]) return gp ? ( diff --git a/src/components/Integrations/QLC/QLCTriggerTable.tsx b/src/components/Integrations/QLC/QLCTriggerTable.tsx index b0a1ca0c..12944017 100644 --- a/src/components/Integrations/QLC/QLCTriggerTable.tsx +++ b/src/components/Integrations/QLC/QLCTriggerTable.tsx @@ -36,6 +36,7 @@ export default function QLCTriggerTable() { useEffect(() => { getQLCWidgets() + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) // Here we get the current triggers from list and set to global state @@ -96,6 +97,7 @@ export default function QLCTriggerTable() { }) addToQLCTriggerList(triggersNew, 'create') } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [integrations]) const deleteTriggerHandler = (paramsTemp: any) => { diff --git a/src/components/Integrations/Spotify/SpotifyAuthButton.tsx b/src/components/Integrations/Spotify/SpotifyAuthButton.tsx index 3c2abc76..78cb6ddc 100644 --- a/src/components/Integrations/Spotify/SpotifyAuthButton.tsx +++ b/src/components/Integrations/Spotify/SpotifyAuthButton.tsx @@ -73,6 +73,7 @@ const SpotifyAuthButton = ({ disabled = false }: any) => { if (cookies.get('access_token')) { setspAuthenticated(true) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) const beginAuth = () => { cookies.set('verifier', (codes as any).verifier) @@ -112,6 +113,7 @@ const SpotifyAuthButton = ({ disabled = false }: any) => { console.warn(err) } } + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useEffect(() => { @@ -121,6 +123,7 @@ const SpotifyAuthButton = ({ disabled = false }: any) => { } else { setspAuthenticated(false) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [cookies]) return !spAuthenticated ? ( diff --git a/src/components/Integrations/Spotify/SpotifyProvider.tsx b/src/components/Integrations/Spotify/SpotifyProvider.tsx index 4526e86a..7fd47ddf 100644 --- a/src/components/Integrations/Spotify/SpotifyProvider.tsx +++ b/src/components/Integrations/Spotify/SpotifyProvider.tsx @@ -135,11 +135,8 @@ const SpotifyProvider = ({ children }: ISpotifyProviderProps) => { } triggersNew.sort((a, b) => a.position_ms - b.position_ms) setCurrentTriggers(triggersNew) - }, [ - spotifyState?.track_window?.current_track?.id, - sceneTriggers.length, - spState?.item?.id - ]) + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [spotifyState?.track_window?.current_track?.id,sceneTriggers.length,spState?.item?.id]) useEffect(() => { if ( @@ -166,7 +163,9 @@ const SpotifyProvider = ({ children }: ISpotifyProviderProps) => { const update = setInterval(updateState, 1000) return () => clearInterval(update) + // eslint-disable-next-line react-hooks/exhaustive-deps }, [player, spotifyState?.paused, integrations]) + useEffect(() => { if (integrations.spotify?.status === 0 || !integrations.spotify?.active) return @@ -233,6 +232,7 @@ const SpotifyProvider = ({ children }: ISpotifyProviderProps) => { if (!spotifyAuthToken && player) { setPlayer(undefined) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [spotifyAuthToken, integrations.spotify?.active]) if (currentSceneTriggers.length > 0) { diff --git a/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpAudioFeatures/SpAudioFeatures.tsx b/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpAudioFeatures/SpAudioFeatures.tsx index 7b048b2b..981cde58 100644 --- a/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpAudioFeatures/SpAudioFeatures.tsx +++ b/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpAudioFeatures/SpAudioFeatures.tsx @@ -54,6 +54,7 @@ export default function SpAudioFeatures() { setSpotifyData('Artist', res) }) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [meta]) const audioFeaturesKey = () => { diff --git a/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpSceneTrigger.tsx b/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpSceneTrigger.tsx index 869c98c8..256b4e80 100644 --- a/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpSceneTrigger.tsx +++ b/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpSceneTrigger.tsx @@ -59,6 +59,7 @@ export default function SpSceneTrigger() { useEffect(() => { getScenes() + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( diff --git a/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpTrack.tsx b/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpTrack.tsx index ca853f0e..f14993c1 100644 --- a/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpTrack.tsx +++ b/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpTrack.tsx @@ -32,6 +32,7 @@ export default function SpTrack({ className }: any) { setPlaylist(r.items) }) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [spotifyCtx?.context?.metadata?.uri, spCtx?.context?.uri]) const album = diff --git a/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpTriggerTable.tsx b/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpTriggerTable.tsx index c126f253..c8829227 100644 --- a/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpTriggerTable.tsx +++ b/src/components/Integrations/Spotify/Widgets/SpotifyWidgetPro/SpTriggerTable.tsx @@ -97,6 +97,7 @@ export default function SpotifyTriggerTable() { useEffect(() => { getSpTriggers() getScenes() + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) // Here we get the current triggers from list and set to global state @@ -130,6 +131,7 @@ export default function SpotifyTriggerTable() { }) addToSpTriggerList(triggersNew, 'create') } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [integrations]) const updateSpTrigger = (rowData: any, val: any) => { diff --git a/src/components/MGraph.tsx b/src/components/MGraph.tsx index dded2fa2..ef91ec81 100644 --- a/src/components/MGraph.tsx +++ b/src/components/MGraph.tsx @@ -172,6 +172,7 @@ const MGraph = () => { return () => { document.removeEventListener('graph_update', handleWebsockets) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [animationDuration, fillOpacity, scaleType]) return ( diff --git a/src/components/MidiInput.tsx b/src/components/MidiInput.tsx index f103575b..96d65c39 100644 --- a/src/components/MidiInput.tsx +++ b/src/components/MidiInput.tsx @@ -83,6 +83,7 @@ const MIDIListener = () => { // webSocket.removeEventListener('open', handleOpen) webSocket.removeEventListener('message', handleMessage) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [scenes, sceneDialogOpen]) return null diff --git a/src/components/OneTimePassword.tsx b/src/components/OneTimePassword.tsx index 98aaec17..a5a0dc63 100644 --- a/src/components/OneTimePassword.tsx +++ b/src/components/OneTimePassword.tsx @@ -22,6 +22,7 @@ const OneTimePassword = ({ enabled }: { enabled: boolean }) => { useEffect(() => { if (otp.length === 6) handleSubmit() + // eslint-disable-next-line react-hooks/exhaustive-deps }, [otp]) useEffect(() => { @@ -41,6 +42,7 @@ const OneTimePassword = ({ enabled }: { enabled: boolean }) => { } } }) + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) if (!isElectron()) return null diff --git a/src/components/SchemaForm/components/Gif/GifFramePicker.tsx b/src/components/SchemaForm/components/Gif/GifFramePicker.tsx index fbdfef38..116153c7 100644 --- a/src/components/SchemaForm/components/Gif/GifFramePicker.tsx +++ b/src/components/SchemaForm/components/Gif/GifFramePicker.tsx @@ -46,10 +46,12 @@ const GifFramePicker: FC = ({ const fetchImage = useCallback(async (ic: string) => { const result = await getGifFrames(ic) setImageData(result.frames) + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useEffect(() => { fetchImage(model.image_location) + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( diff --git a/src/components/SchemaForm/components/GradientPicker/GradientPicker.wrapper.tsx b/src/components/SchemaForm/components/GradientPicker/GradientPicker.wrapper.tsx index 72a05818..94974924 100644 --- a/src/components/SchemaForm/components/GradientPicker/GradientPicker.wrapper.tsx +++ b/src/components/SchemaForm/components/GradientPicker/GradientPicker.wrapper.tsx @@ -46,6 +46,7 @@ const GradientPickerWrapper = ({ useEffect(() => { getColors() + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return ( diff --git a/src/components/Tours/TourSettings.tsx b/src/components/Tours/TourSettings.tsx index fa8bc4c6..bf802f0b 100644 --- a/src/components/Tours/TourSettings.tsx +++ b/src/components/Tours/TourSettings.tsx @@ -115,7 +115,7 @@ const steps = [

Transitions

Finetune how LedFx change from one effect to another

- + gif
), @@ -138,6 +138,7 @@ const TourSettings = ({ cally }: any) => { if (isTourOpen && settingsExpanded !== 'all') { setSettingsExpanded('all') } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [isTourOpen]) return ( diff --git a/src/pages/Device/Effects.tsx b/src/pages/Device/Effects.tsx index 0f5250a7..8706cd0b 100644 --- a/src/pages/Device/Effects.tsx +++ b/src/pages/Device/Effects.tsx @@ -105,6 +105,7 @@ const EffectsCard = ({ virtId }: { virtId: string }) => { useEffect(() => { const v = getV() if (v) setVirtual(v) + // eslint-disable-next-line react-hooks/exhaustive-deps }, [JSON.stringify(virtuals[virtId])]) const effectType = virtual && virtual.effect.type @@ -154,6 +155,7 @@ const EffectsCard = ({ virtId }: { virtId: string }) => { if (graphs) { setPixelGraphs([virtId]) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [graphs, setPixelGraphs, getVirtuals, getSchemas, effectType]) useEffect(() => { @@ -171,16 +173,8 @@ const EffectsCard = ({ virtId }: { virtId: string }) => { setTheModel(virtual?.effect.config) } - }, [ - virtuals, - virtuals[virtId], - virtuals[virtId]?.effect, - JSON.stringify(virtuals[virtId]?.effect?.config), - virtual, - virtual?.effect, - virtual?.effect.config, - effectType - ]) + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [virtuals,virtuals[virtId],virtuals[virtId]?.effect,JSON.stringify(virtuals[virtId]?.effect?.config),virtual,virtual?.effect,virtual?.effect.config,effectType]) // console.log('virtual', virtual?.effect?.config) return ( diff --git a/src/pages/Device/Presets.tsx b/src/pages/Device/Presets.tsx index 5bcdff7a..bfec3b02 100644 --- a/src/pages/Device/Presets.tsx +++ b/src/pages/Device/Presets.tsx @@ -197,12 +197,14 @@ const PresetsCard = ({ virtual, effectType, presets, style }: any) => { useEffect(() => { getVirtuals() if (effectType) getPresets(effectType) + // eslint-disable-next-line react-hooks/exhaustive-deps }, [getVirtuals, effectType]) useEffect(() => { if (features.cloud && !!localStorage.getItem('jwt') && isLogged) { getCloudPresets() } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [isLogged, effectType]) const syncPresets = async () => { diff --git a/src/pages/Device/StreamTo.tsx b/src/pages/Device/StreamTo.tsx index 361292b0..8bcda284 100644 --- a/src/pages/Device/StreamTo.tsx +++ b/src/pages/Device/StreamTo.tsx @@ -63,6 +63,7 @@ const StreamToCard = ({ cref.current = virtuals[virtual.id]?.effect } } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [virtuals[virtual.id]?.effect]) return ( diff --git a/src/pages/Devices/Devices.tsx b/src/pages/Devices/Devices.tsx index c945e717..d80054d2 100644 --- a/src/pages/Devices/Devices.tsx +++ b/src/pages/Devices/Devices.tsx @@ -76,6 +76,7 @@ const Devices = () => { if (graphs && graphsMulti) { setPixelGraphs(Object.keys(virtuals)) } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [graphs, graphsMulti, setPixelGraphs]) return ( diff --git a/src/pages/Devices/EditVirtuals/EditMatrix/M.tsx b/src/pages/Devices/EditVirtuals/EditMatrix/M.tsx index b114fb6a..ec3279e6 100644 --- a/src/pages/Devices/EditVirtuals/EditMatrix/M.tsx +++ b/src/pages/Devices/EditVirtuals/EditMatrix/M.tsx @@ -242,6 +242,7 @@ const EditMatrix: FC<{ virtual: any }> = ({ virtual }) => { }) } } + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) /** @@ -277,13 +278,14 @@ const EditMatrix: FC<{ virtual: any }> = ({ virtual }) => { setM(updatedM) } } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [points]) return (