fix: address linting issues in LeadThoughtsGroup and TaskAttachments components
- Added an eslint-disable comment in LeadThoughtsGroupRow to clarify intentional state updates in useEffect. - Removed unnecessary eslint-disable comment in TaskAttachments to clean up the codebase.
This commit is contained in:
parent
7afe5d4d59
commit
410cb8a10f
2 changed files with 1 additions and 1 deletions
|
|
@ -139,6 +139,7 @@ export const LeadThoughtsGroupRow = ({
|
||||||
const [isLive, setIsLive] = useState(computeIsLive);
|
const [isLive, setIsLive] = useState(computeIsLive);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect -- intentional immediate sync to avoid 1s stale gap
|
||||||
setIsLive(computeIsLive());
|
setIsLive(computeIsLive());
|
||||||
const id = window.setInterval(() => setIsLive(computeIsLive()), 1000);
|
const id = window.setInterval(() => setIsLive(computeIsLive()), 1000);
|
||||||
return () => window.clearInterval(id);
|
return () => window.clearInterval(id);
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,6 @@ export const TaskAttachments = ({
|
||||||
void handlePreview(att);
|
void handlePreview(att);
|
||||||
}}
|
}}
|
||||||
onDelete={() => {
|
onDelete={() => {
|
||||||
// eslint-disable-next-line sonarjs/void-use -- void needed to mark floating promise
|
|
||||||
void handleDelete(att.id, att.mimeType);
|
void handleDelete(att.id, att.mimeType);
|
||||||
}}
|
}}
|
||||||
onDataLoaded={handleThumbLoaded}
|
onDataLoaded={handleThumbLoaded}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue