Skip to content

Clear MediaManager upload intervals on unmount and fix use-before-declaration #964

Description

@RUKAYAT-CODER

Overview
In src/components/cms/MediaManager.tsx handleFileDrop (lines 13-20) lists uploadFiles as a dependency before it is declared at line 28, and the per-file setInterval (lines 43-53) is never cleared on unmount, so uploads keep firing timers and toasts after the component is gone. Declare uploadFiles before use and clear the intervals in a cleanup.

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions