-
Notifications
You must be signed in to change notification settings - Fork 623
Dashboard: Add team id to thirdweb client #6775
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
Dashboard: Add team id to thirdweb client #6775
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6775 +/- ##
=======================================
Coverage 55.18% 55.18%
=======================================
Files 896 896
Lines 56924 56924
Branches 3943 3943
=======================================
Hits 31412 31412
Misses 25416 25416
Partials 96 96
🚀 New features to boost your workflow:
|
size-limit report 📦
|
70eea22 to
1dd8b19
Compare
1dd8b19 to
8f51e87
Compare
8f51e87 to
8bb47ce
Compare
jnsdls
left a comment
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
8bb47ce to
667a360
Compare
667a360 to
5715da2
Compare
Merge activity
|
<!--
## 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 focuses on updating the usage of the `getThirdwebClient` function throughout the codebase, transitioning to using an options object that includes `jwt` and `teamId`. This change enhances client initialization consistency and improves the handling of team-related functionality.
### Detailed summary
- Updated `getThirdwebClient` to accept an options object with `jwt` and `teamId`.
- Modified several components to pass the new client structure.
- Added constants for `LAST_USED_PROJECT_ID` and `LAST_USED_TEAM_ID`.
- Enhanced various components to include `client` as a prop, improving flexibility.
- Adjusted several pages and components to handle team IDs better.
- Improved cookie management for storing and retrieving the last used team ID.
- Updated storybook examples to utilize the new client structure.
> The following files were skipped due to too many changes: `apps/dashboard/src/app/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.stories.tsx`, `apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/components/published-contracts.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/components/Transactions/index.tsx`, `apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx`, `apps/dashboard/src/components/contract-components/contract-table/index.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx`, `apps/dashboard/src/app/(dashboard)/(bridge)/routes/components/server/routelist-card.tsx`, `apps/dashboard/src/app/(dashboard)/(bridge)/routes/components/server/routes-table.tsx`, `apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/page.tsx`, `apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/resolveAddressAndEns.tsx`, `apps/dashboard/src/app/team/components/TeamHeader/TeamSelectorMobileMenuButton.tsx`, `apps/dashboard/src/app/team/components/TeamHeader/TeamHeaderUI.stories.tsx`, `apps/dashboard/src/app/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx`, `apps/dashboard/src/app/(dashboard)/(bridge)/routes/components/server/routelist-row.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx`, `apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/members/TeamMembersSettingsPage.stories.tsx`, `apps/dashboard/src/app/(dashboard)/published-contract/[publisher]/[contract_id]/page.tsx`, `apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx`, `apps/dashboard/src/app/nebula-app/(app)/components/ExecuteTransactionCard.stories.tsx`, `apps/dashboard/src/lib/wallet/nfts/alchemy.ts`, `apps/dashboard/src/lib/wallet/nfts/moralis.ts`, `apps/dashboard/src/app/(dashboard)/contracts/publish/[publish_uri]/page.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/metadata-header.tsx`, `apps/dashboard/src/app/team/components/TeamHeader/team-header-logged-in.client.tsx`, `apps/dashboard/src/components/contract-components/fetchPublishedContracts.ts`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/getModuleInstalledParams.ts`, `apps/dashboard/src/app/nebula-app/(app)/components/Chats.stories.tsx`, `apps/dashboard/src/components/explore/contract-card/index.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx`, `apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/components/PublishedContractTable.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/server/chainlist-card.tsx`, `apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/ProfileUI.tsx`, `apps/dashboard/src/components/contract-components/fetch-contracts-with-versions.ts`, `apps/dashboard/src/app/team/[team_slug]/(team)/layout.tsx`, `apps/dashboard/src/@/components/blocks/Avatars/ProjectAvatar.stories.tsx`, `apps/dashboard/src/app/(dashboard)/published-contract/components/publish-based-deploy.tsx`, `apps/dashboard/src/app/team/components/TeamHeader/team-header.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/components/Transactions/TransactionCharts.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/layout.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/data-table.tsx`, `apps/dashboard/src/app/(dashboard)/published-contract/[publisher]/[contract_id]/utils/getPublishedContractsWithPublisherMapping.ts`, `apps/dashboard/src/app/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/page.tsx`, `apps/dashboard/src/@/components/blocks/Avatars/GradientAvatar.stories.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/page.tsx`, `apps/dashboard/src/components/contract-components/hooks.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
5715da2 to
ac8b09f
Compare

PR-Codex overview
This PR focuses on enhancing the handling of the
ThirdwebClientacross various components by introducing a unified client instantiation method that includes options for JWT and team ID. It also refactors components to utilize this new client setup.Detailed summary
getThirdwebClientto accept options forjwtandteamId.clientprop explicitly.