Minor performance improvements.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

This commit is contained in:
Tom Butcher 2026-03-13 19:47:26 +00:00
parent 88674f0d6e
commit 3f9da22b58
3 changed files with 4 additions and 3 deletions

View File

@ -29,7 +29,7 @@ const FilePreview = ({ file, style = {} }) => {
}
setFileObjectUrl(objectUrl)
setLoading(false)
}, [file, fetchFileContent])
}, [file, fetchFileContent, error])
useEffect(() => {
if (file?.type && token != null) {

View File

@ -57,7 +57,7 @@ const FileUpload = ({
: !currentFiles
setHasNoItems(noItems)
onChange(currentFiles)
}, [currentFiles, multiple])
}, [currentFiles, multiple, onChange])
const handleFileUpload = async (file) => {
try {

View File

@ -231,7 +231,8 @@ const AuthProvider = ({ children }) => {
return () => {
cancelled = true
}
}, [isElectron, getAuthSession, clearPersistedSession, getUserInfo])
// eslint-disable-next-line react-hooks/exhaustive-deps -- run only on mount to load persisted session; deps are stable in behavior
}, [])
// Set up cookie synchronization between tabs
useEffect(() => {