Skip to content

Dashboard: Fix team links in header on pages outside /team layout #6981

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

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented May 8, 2025


PR-Codex overview

This PR focuses on updating the href property of the Link component in the TeamSelectionUI.tsx file to ensure it correctly replaces the team slug in the URL only when certain conditions are met.

Detailed summary

  • Modified the conditional logic for the href property of the Link component.
  • Added a check to ensure pathname starts with /team before replacing the current team slug.
  • Updated the replacement logic to use template literals for constructing URLs.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented May 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2025 11:41am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) May 9, 2025 11:41am
login ⬜️ Skipped (Inspect) May 9, 2025 11:41am
thirdweb_playground ⬜️ Skipped (Inspect) May 9, 2025 11:41am
wallet-ui ⬜️ Skipped (Inspect) May 9, 2025 11:41am

Copy link

changeset-bot bot commented May 8, 2025

⚠️ No Changeset found

Latest commit: ccb9cd5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel vercel bot temporarily deployed to Preview – wallet-ui May 8, 2025 19:36 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 8, 2025 19:36 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 8, 2025 19:36 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 8, 2025 19:36 Inactive
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label May 8, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@MananTank MananTank force-pushed the 05-09-dashboard_fix_team_links_in_header_on_pages_outside__team_layout branch from c1489a5 to 377fb4c Compare May 8, 2025 19:37
Copy link

codecov bot commented May 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.60%. Comparing base (3dc11c0) to head (ccb9cd5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6981   +/-   ##
=======================================
  Coverage   54.60%   54.60%           
=======================================
  Files         903      903           
  Lines       57934    57934           
  Branches     3970     3970           
=======================================
  Hits        31632    31632           
  Misses      26202    26202           
  Partials      100      100           
Flag Coverage Δ
packages 54.60% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vercel vercel bot temporarily deployed to Preview – login May 8, 2025 19:38 Inactive
@MananTank MananTank marked this pull request as ready for review May 8, 2025 19:38
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 8, 2025 19:38 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 8, 2025 19:38 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 8, 2025 19:38 Inactive
@MananTank MananTank requested review from a team as code owners May 8, 2025 19:38
Copy link
Contributor

github-actions bot commented May 8, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 54.17 KB (0%) 1.1 s (0%) 174 ms (+142.59% 🔺) 1.3 s
thirdweb (cjs) 193.88 KB (0%) 3.9 s (0%) 311 ms (+8.06% 🔺) 4.2 s
thirdweb (minimal + tree-shaking) 5.69 KB (0%) 114 ms (0%) 69 ms (+991.89% 🔺) 182 ms
thirdweb/chains (tree-shaking) 524 B (0%) 11 ms (0%) 43 ms (+1113.41% 🔺) 53 ms
thirdweb/react (minimal + tree-shaking) 19.51 KB (0%) 391 ms (0%) 63 ms (+333.54% 🔺) 453 ms

Copy link
Contributor

graphite-app bot commented May 8, 2025

Merge activity

graphite-app bot pushed a commit that referenced this pull request May 8, 2025
)

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR modifies the `href` attribute of a `Link` component in the `TeamSelectionUI.tsx` file to ensure that the URL is correctly updated when navigating between teams, specifically when on the `/team` page.

### Detailed summary
- Updated the `href` logic in the `Link` component.
- Added a condition to check if `pathname` starts with `/team`.
- Changed the replacement logic to include the `/team/` prefix for both `currentTeam` and `team`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@graphite-app graphite-app bot force-pushed the 05-09-dashboard_fix_team_links_in_header_on_pages_outside__team_layout branch from 377fb4c to 75163ec Compare May 8, 2025 21:31
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 8, 2025 21:31 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 8, 2025 21:31 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 8, 2025 21:31 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 8, 2025 21:31 Inactive
MananTank added a commit that referenced this pull request May 9, 2025
)

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR modifies the `href` attribute of a `Link` component in the `TeamSelectionUI.tsx` file to ensure that the URL is correctly updated when navigating between teams, specifically when on the `/team` page.

### Detailed summary
- Updated the `href` logic in the `Link` component.
- Added a condition to check if `pathname` starts with `/team`.
- Changed the replacement logic to include the `/team/` prefix for both `currentTeam` and `team`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@MananTank MananTank force-pushed the 05-09-dashboard_fix_team_links_in_header_on_pages_outside__team_layout branch from 75163ec to faf22f1 Compare May 9, 2025 11:26
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 9, 2025 11:26 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 9, 2025 11:26 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 9, 2025 11:26 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 9, 2025 11:26 Inactive
)

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR modifies the `href` attribute of the `Link` component in the `TeamSelectionUI.tsx` file to ensure that the URL path is correctly constructed when navigating between team pages.

### Detailed summary
- Updated the `href` logic to check if `pathname` starts with `/team`.
- Changed the `replace` method to use the full path for `currentTeam.slug` and `team.slug`.
- Ensured that the fallback URL for the `Link` defaults to `/team/${team.slug}` when conditions are not met.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@graphite-app graphite-app bot force-pushed the 05-09-dashboard_fix_team_links_in_header_on_pages_outside__team_layout branch from faf22f1 to ccb9cd5 Compare May 9, 2025 11:33
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 9, 2025 11:33 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 9, 2025 11:33 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 9, 2025 11:33 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 9, 2025 11:33 Inactive
@graphite-app graphite-app bot merged commit ccb9cd5 into main May 9, 2025
23 checks passed
@graphite-app graphite-app bot deleted the 05-09-dashboard_fix_team_links_in_header_on_pages_outside__team_layout branch May 9, 2025 11:41
@vercel vercel bot temporarily deployed to Production – wallet-ui May 9, 2025 11:41 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground May 9, 2025 11:41 Inactive
@vercel vercel bot temporarily deployed to Production – login May 9, 2025 11:41 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 May 9, 2025 11:41 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants