fix: add beforeunload logic for board in edit mode (#1531)
This commit is contained in:
@@ -61,7 +61,8 @@ export const UserAvatarMenu = ({ children }: UserAvatarMenuProps) => {
|
||||
}, [logoutUrl, openModal, router]);
|
||||
|
||||
return (
|
||||
<Menu width={300} withArrow withinPortal>
|
||||
// We use keepMounted so we can add event listeners to prevent navigating away without saving the board
|
||||
<Menu width={300} withArrow withinPortal keepMounted>
|
||||
<Menu.Dropdown>
|
||||
<Menu.Item onClick={toggleColorScheme} leftSection={<ColorSchemeIcon size="1rem" />}>
|
||||
{colorSchemeText}
|
||||
|
||||
Reference in New Issue
Block a user