-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix(request) avoid using request url in the ui. fixes #289 #298
base: main
Are you sure you want to change the base?
Conversation
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.
I thought setting the flow=<flow_id>
in the url was intentional, are we sure we want to remove that?
03e5b0e
to
d53dcad
Compare
Signed-off-by: David Edler <david.edler@canonical.com>
d53dcad
to
53db067
Compare
Yes, you are right. Changed the approach and unified a bit across all pages. |
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.
lgtm, but I have a question
await router.replace( | ||
{ | ||
pathname: window.location.pathname, | ||
query: router.query, | ||
}, | ||
undefined, | ||
{ shallow: true }, | ||
); | ||
.then(({ data }) => { | ||
const pwParam = pwChanged ? `&pw_changed=${pwChanged.toString()}` : ""; | ||
if (flowId !== data.id) { | ||
window.history.replaceState( |
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.
question: Is router.replace
and window.history.replaceState
the same API and the 1st is the nextjs way of interacting with the history API? In that case why don't we use the tool provided from the framework?
Done
fixes #289