yral-dapp / hot-or-not-web-leptos-ssr

Other
2 stars 8 forks source link

added When user shared the profile, show the other user public profile #482

Open joel-medicala-yral opened 4 days ago

joel-medicala-yral commented 4 days ago

closes #474

harshita-srivastava-yral commented 4 days ago

@joel-in-bytes As discussed, there are couple of changes to made here. We still don't have public profile links. We need to add user principal ID as param in URL so that any user can navigate. Additionally, when token gets created and user clicks on back to profile on the pop up, the flow is broken We will also need to ensure the "Send" token is hidden when someone else is viewing the token details.

joel-medicala-yral commented 4 days ago

@harshita-srivastava-yral

There are a few issues here for which I need some clarification. Basically, from what I understood:

  1. The token successfully created popup:

    Token Popup

    This popup redirects the user to https://icpump.fun/your-profile?tab=tokens, right?
    So, I need to change this to /profile/id/token, correct?

    Status: Fixed

  2. Routes to the profile and your-profile Status: Fixed

harshita-srivastava-yral commented 3 days ago

Hi Joel,

While for all other cases, the link works fine however when switching tabs within the profile the links are not working as per expectation.

E.g.: https://pr-482-yral-dapp-hot-or-not-web-leptos-ssr.fly.dev/profile/3s6l6-oszek-qvd6b-whtue-xtj4q-2cbxe-jkmo6-lti5h-bzhtk-uk3xt-hqe/posts

This shows the post however shows nothing on "Stakes" and "Tokens"

However for same principal if I directly click https://pr-482-yral-dapp-hot-or-not-web-leptos-ssr.fly.dev/profile/3s6l6-oszek-qvd6b-whtue-xtj4q-2cbxe-jkmo6-lti5h-bzhtk-uk3xt-hqe/tokens The link displays me all the tokens of this principal...!

Hence we need to fix 3 issues:

  1. The posts links when swictched to "Stakes" and "Tokens" tab should display the list of stakes and tokens of respective principal which somehow is not being shown
  2. When I directly land on Tokens tab via link, the bottom nav highlights "HOME" instead of profile
  3. Make Profile > Tokens as the default selection instead of Profile > posts in icpump.fun

Additionally, for icpumpfun please make "tokens" as default tab when profile icon is clicked

joel-medicala-yral commented 3 days ago

Hi Joel,

While for all other cases, the link works fine however when switching tabs within the profile the links are not working as per expectation.

E.g.: https://pr-482-yral-dapp-hot-or-not-web-leptos-ssr.fly.dev/profile/3s6l6-oszek-qvd6b-whtue-xtj4q-2cbxe-jkmo6-lti5h-bzhtk-uk3xt-hqe/posts

This shows the post however shows nothing on "Stakes" and "Tokens"

However for same principal if I directly click https://pr-482-yral-dapp-hot-or-not-web-leptos-ssr.fly.dev/profile/3s6l6-oszek-qvd6b-whtue-xtj4q-2cbxe-jkmo6-lti5h-bzhtk-uk3xt-hqe/tokens

The link displays me all the tokens of this principal...!

Hence we need to fix 3 issues:

  1. The posts links when swictched to "Stakes" and "Tokens" tab should display the list of stakes and tokens of respective principal which somehow is not being shown

  2. When I directly land on Tokens tab via link, the bottom nav highlights "HOME" instead of profile

  3. Make Profile > Tokens as the default selection instead of Profile > posts in icpump.fun

Additionally, for icpumpfun please make "tokens" as default tab when profile icon is clicked

I think if you refresh it shows the routes for this link its prolly the preview cache I'll look into it... Update: Apparently it's a reactivity bug

As for the highlights I'll work with rupansh to fix it apparently the navbar cannot have access to the canister if we tried to do that the application would crash...

harshita-srivastava-yral commented 2 days ago

All the above issues have been resolved however the bottom nav tabs are still indicating home page instead of profile…! @joel-medicala-yral Do we feel we can solve it or we it will complicate things ?

joel-medicala-yral commented 1 day ago

There might be a slight delay when it switches the tabs but it's working on my end on this preview link though. We actually tried many different things but this was the only thing that worked...

The current logic is like: If its the user's own profile link the profile tab will be highlighted but its other people's profile the home will be highlighted....

image