Minor performance improvements.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
This commit is contained in:
parent
88674f0d6e
commit
3f9da22b58
@ -29,7 +29,7 @@ const FilePreview = ({ file, style = {} }) => {
|
||||
}
|
||||
setFileObjectUrl(objectUrl)
|
||||
setLoading(false)
|
||||
}, [file, fetchFileContent])
|
||||
}, [file, fetchFileContent, error])
|
||||
|
||||
useEffect(() => {
|
||||
if (file?.type && token != null) {
|
||||
|
||||
@ -57,7 +57,7 @@ const FileUpload = ({
|
||||
: !currentFiles
|
||||
setHasNoItems(noItems)
|
||||
onChange(currentFiles)
|
||||
}, [currentFiles, multiple])
|
||||
}, [currentFiles, multiple, onChange])
|
||||
|
||||
const handleFileUpload = async (file) => {
|
||||
try {
|
||||
|
||||
@ -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(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user