-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore: active url to save with useState #12815
base: fix/browser-tab-convert-ts
Are you sure you want to change the base?
chore: active url to save with useState #12815
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
@@ -849,7 +850,7 @@ export const BrowserTab: React.FC<BrowserTabProps> = (props) => { | |||
|
|||
// Cancel loading the page if we detect its a phishing page | |||
if (!isAllowedOrigin(urlOrigin)) { | |||
handleNotAllowedUrl(activeUrl.current); // should this be activeUrl.current instead of url? | |||
handleNotAllowedUrl(activeUrl); // should this be activeUrl instead of 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.
good question. At this point, activeUrl
value should be the same as urlOrigin
value.
It would make more sense to use urlOrigin
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
I find it useful to reference this react example on this PR https://react.dev/learn/referencing-values-with-refs#differences-between-refs-and-state TL;DR
|
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist