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

fix: link to view profile #2280

Merged
merged 1 commit into from
Feb 15, 2024
Merged

fix: link to view profile #2280

merged 1 commit into from
Feb 15, 2024

Conversation

blushi
Copy link
Member

@blushi blushi commented Feb 7, 2024

Description

ref: #2248 (comment)


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • provided a link to the relevant issue or specification
  • provided instructions on how to test
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

How to test

  1. Go to https://deploy-preview-2280--regen-marketplace.netlify.app/ and connect with a web2 account (no wallet address)
  2. Go to edit profile and click on "view profile"
  3. It should go back to your profile page as expected

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items
.

I have...

  • confirmed all author checklist items have been addressed
  • reviewed code correctness and readability
  • verified React components follow DRY principles
  • reviewed documentation is accurate
  • reviewed tests
  • manually tested (if applicable)

Copy link

netlify bot commented Feb 7, 2024

Deploy Preview for regen-website ready!

Name Link
🔨 Latest commit ce8d73a
🔍 Latest deploy log https://app.netlify.com/sites/regen-website/deploys/65cce543280b430008dd07d8
😎 Deploy Preview https://deploy-preview-2280--regen-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -21,9 +21,9 @@ export const ViewProfileButton = ({ setIsWarningModalOpen }: Props) => {
<OutlinedButton
onClick={() => {
if (isDirtyRef?.current) {
setIsWarningModalOpen('/profile/portfolio');
setIsWarningModalOpen('/profile');
Copy link
Member Author

@blushi blushi Feb 7, 2024

Choose a reason for hiding this comment

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

/profile/portfolio (ecocredits portfolio) is only available to web3 users which is why it was displaying a warning to connect a wallet address
updating to the generic /profile path

@blushi blushi requested review from clevinson and a team February 7, 2024 08:15
@blushi blushi mentioned this pull request Feb 7, 2024
11 tasks
@blushi
Copy link
Member Author

blushi commented Feb 7, 2024

@erikalogie @clevinson see testing instructions above

@erikalogie
Copy link
Collaborator

This is what is happening for me: https://monosnap.com/file/mVEXAqd1SUyNAX944OIfoVqW0zpRPc

@blushi
Copy link
Member Author

blushi commented Feb 7, 2024

@erikalogie yes this is precisely fixing this issue, looking at your video, you're testing on dev.app.regen.network where the bug is still there, please use the deploy preview link instead: https://deploy-preview-2280--regen-marketplace.netlify.app/

@erikalogie
Copy link
Collaborator

@erikalogie yes this is precisely fixing this issue, looking at your video, you're testing on dev.app.regen.network where the bug is still there, please use the deploy preview link instead: https://deploy-preview-2280--regen-marketplace.netlify.app/

Oh duh lol. Ok, yes this looks good!

@clevinson
Copy link
Member

This deploy preview doesn't work for me (on Safari) when clicking on email log in:

  • I type a valid email
  • press "Log In"
  • Button blinks, but nothing else happens
  • When I open console, I get a the following error: 403 forbidden: https://api-staging.regen.network/marketplace/v1/auth/passcode

Logging in with Google works as expected and fixes the bug.

My guess is that the issue has something to do with api-staging.regen.network not allowing requests from domains other than dev.app.regen.network? So may be this is a non-issue. But I wanted to flag anyway incase it is indeed a problem that needs resolving.

@blushi
Copy link
Member Author

blushi commented Feb 8, 2024

This deploy preview doesn't work for me (on Safari) when clicking on email log in:

  • I type a valid email
  • press "Log In"
  • Button blinks, but nothing else happens
  • When I open console, I get a the following error: 403 forbidden: https://api-staging.regen.network/marketplace/v1/auth/passcode

Logging in with Google works as expected and fixes the bug.

My guess is that the issue has something to do with api-staging.regen.network not allowing requests from domains other than dev.app.regen.network? So may be this is a non-issue. But I wanted to flag anyway incase it is indeed a problem that needs resolving.

Yes doesn't seem related, api-staging.regen.network does allow such requests but I suspect Safari is not sending the CSRF cookie along the requests because the deploy preview is on a different domain, hence the 403 error. While chromium browsers do send it.
See https://discussions.apple.com/thread/8289436?sortBy=best
So this shouldn't block this work, looks like it's a matter of updating your settings in Safari for testing deploy previews.

@aaronc
Copy link
Member

aaronc commented Feb 13, 2024

For me I always get redirected to dev.app.regen.network when I try to test this. I don't seem to be able to login with that deploy preview to actually test.

@blushi
Copy link
Member Author

blushi commented Feb 13, 2024

For me I always get redirected to dev.app.regen.network when I try to test this. I don't seem to be able to login with that deploy preview to actually test.

Could you login with email/passcode instead of google? For google login the redirect url is set on the server side, and on staging it's currently set to dev.app.regen.network but I can update it temporarily to use this deploy preview if needed.

Copy link
Member

@aaronc aaronc left a comment

Choose a reason for hiding this comment

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

Works in Brave

@blushi blushi force-pushed the fix-web2-view-profile branch from 774ce72 to ce8d73a Compare February 14, 2024 16:07
@blushi blushi merged commit 758dece into dev Feb 15, 2024
14 checks passed
@blushi blushi deleted the fix-web2-view-profile branch February 15, 2024 07:26
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

Successfully merging this pull request may close these issues.

4 participants