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

Variant Exit not working. #13

Open
didacus opened this issue Jan 21, 2021 · 1 comment
Open

Variant Exit not working. #13

didacus opened this issue Jan 21, 2021 · 1 comment

Comments

@didacus
Copy link

didacus commented Jan 21, 2021

The initial and enter work perfectly. Unfortunately, the fade-out before going to another page does not happen. Any idea what might be causing that?

@lisandropat
Copy link

lisandropat commented Jul 27, 2021

Same happent here, also I couldn't run my project as I was getting "Cannot read property 'pathname' of undefined"

location props is only available in top-level components (pages). So if for some reason, you are reusing Layout component elsewhere and you are not providing (or it's not available) the location, it will break your code.

In your case, it seems that you are not providing the location at the 404 page. You can bypass it adding a default value such as:

const Layout = ({ children, location="" }) => ()

The ="" to location is the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants