Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up local store mods when navigating away from realm editor #536

Merged

Conversation

JulianKniephoff
Copy link
Member

Fixes #457 and some related bugs.

@github-actions
Copy link

🚀 This PR was deployed at https://pr536.tobira.opencast.org. The deployment will be updated whenever someone pushes onto this PR's branch.

Copy link
Member

@LukasKalbertodt LukasKalbertodt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does indeed fix the bug 👍

Comment on lines 104 to 109
const router = useRouter();
useEffect(() => (
router.listenAtNav(() => {
onCancel?.();
})
));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you just do this?

Suggested change
const router = useRouter();
useEffect(() => (
router.listenAtNav(() => {
onCancel?.();
})
));
useEffect(() => () => onCancel?.());

@LukasKalbertodt LukasKalbertodt merged commit c7d1373 into elan-ev:master Sep 8, 2022
@JulianKniephoff JulianKniephoff deleted the fix-leaving-realm-editor branch September 12, 2022 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:user User facing changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Critical error" when leaving "edit realm content" page while editing series or video block
2 participants