bc95237b7c7e2120a9082231dbf44df305356c29
The error occurred because the AccountSwitcher component was returning null while the DropdownMenu was still mounted and open. This caused React to throw a minified error #300 about invalid elements. The fix ensures the dropdown menu is closed before removing the login, preventing the component from being unmounted while still rendering its dropdown content. Changes: - Added controlled state for dropdown menu (isOpen/setIsOpen) - Created handleLogout function that closes dropdown before removing login - Used setTimeout to ensure dropdown closes before state update Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
Description
Languages
TypeScript
95.7%
Java
1.5%
JavaScript
0.9%
Swift
0.9%
CSS
0.5%
Other
0.4%