-
-
Notifications
You must be signed in to change notification settings - Fork 18
Add back support #140
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
base: main
Are you sure you want to change the base?
Add back support #140
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,6 +61,7 @@ function handleNav(state, action) { | |
|
|
||
| if (push === true) history.pushState(null, '', url); | ||
| else if (push === false) history.replaceState(null, '', url); | ||
|
|
||
| return url; | ||
| }; | ||
|
|
||
|
|
@@ -112,6 +113,9 @@ export function LocationProvider(props) { | |
| path, | ||
| query: Object.fromEntries(u.searchParams), | ||
| route: (url, replace) => route({ url, replace }), | ||
| back: () => { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see too much of a need personally, though wouldn't hurt if added either |
||
| history.back(); | ||
| }, | ||
| wasPush | ||
| }; | ||
| }, [url]); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also offer
.forward()at the same time for balance?