Skip to content

Commit 26e3c57

Browse files
committed
Complete various TODOs in team layout (#4959)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on enhancing the handling of team images across various components in the dashboard. It updates the `src` attributes for `GradientAvatar` and `ProjectAvatar` components to use the appropriate team images, while also improving the `InviteSection` button functionality. ### Detailed summary - Updated `src` for `GradientAvatar` in `TeamSelectionUI.tsx` to use `team.image`. - Modified `className` for `Img` in `ProjectAvatar.tsx` to include an additional `border-border` class. - Changed `src` for `titleAvatarIcon` in `TeamSettingsSidebar.tsx` to use `props.team.image`. - Updated the `Upgrade` button in `InviteSection.tsx` to be a link to billing settings. - Set `src` for `GradientAvatar` in `TeamHeaderUI.tsx` and `TeamHeaderMobileUI.tsx` to use `currentTeam.image`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 89bcb92 commit 26e3c57

File tree

5 files changed

+22
-14
lines changed

5 files changed

+22
-14
lines changed

apps/dashboard/src/@/components/blocks/Avatars/ProjectAvatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function ProjectAvatar(props: {
99
return (
1010
<Img
1111
src={props.src}
12-
className={cn("rounded-lg border", props.className)}
12+
className={cn("rounded-lg border border-border", props.className)}
1313
alt={""}
1414
fallback={
1515
<div className="flex items-center justify-center bg-muted/50">

apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/_components/sidebar/TeamSettingsSidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function TeamSettingsSidebar(props: {
2222
team={props.team}
2323
titleAvatarIcon={{
2424
id: props.team.id,
25-
src: "", // TODO - set team image
25+
src: props.team.image || "",
2626
}}
2727
/>
2828
<RenderLinkGroup
@@ -31,7 +31,7 @@ export function TeamSettingsSidebar(props: {
3131
team={props.team}
3232
titleAvatarIcon={{
3333
id: props.account?.id,
34-
src: "", // TODO - set team image
34+
src: props.team.image || "",
3535
}}
3636
/>
3737
</aside>

apps/dashboard/src/app/team/[team_slug]/(team)/~/settings/members/InviteSection.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function InviteSection(props: {
3131
bottomSection = (
3232
<div className="lg:px6 flex items-center justify-between gap-4 border-border border-t px-4 py-4">
3333
<p className="text-muted-foreground text-sm">
34-
This feature is only available on the
34+
This feature is only available on the{" "}
3535
<Link
3636
href="https://thirdweb.com/pricing"
3737
target="_blank"
@@ -41,9 +41,13 @@ export function InviteSection(props: {
4141
</Link>
4242
</p>
4343

44-
{/* TODO - link to billing settings page */}
45-
<Button variant="outline" size="sm">
46-
Upgrade
44+
<Button variant="outline" size="sm" asChild>
45+
<Link
46+
href={`/team/${props.team.slug}/~/settings/billing`}
47+
className="gap-2"
48+
>
49+
Upgrade
50+
</Link>
4751
</Button>
4852
</div>
4953
);

apps/dashboard/src/app/team/components/TeamHeader/TeamHeaderUI.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ export function TeamHeaderDesktopUI(props: TeamHeaderCompProps) {
4848
href={`/team/${currentTeam.slug}`}
4949
className="flex flex-row items-center gap-2 font-normal text-sm"
5050
>
51-
{/* TODO - set team image */}
52-
<GradientAvatar id={currentTeam.id} src={""} className="size-6" />
53-
51+
<GradientAvatar
52+
id={currentTeam.id}
53+
src={currentTeam.image || ""}
54+
className="size-6"
55+
/>
5456
<span> {currentTeam.name} </span>
5557
<TeamPlanBadge plan={teamPlan} />
5658
</Link>
@@ -125,8 +127,11 @@ export function TeamHeaderMobileUI(props: TeamHeaderCompProps) {
125127
"flex flex-row items-center gap-2 font-normal text-foreground text-sm",
126128
)}
127129
>
128-
{/* TODO - set team image */}
129-
<GradientAvatar id={currentTeam.id} src={""} className="size-6" />
130+
<GradientAvatar
131+
id={currentTeam.id}
132+
src={currentTeam.image || ""}
133+
className="size-6"
134+
/>
130135

131136
{!props.currentProject && (
132137
<span className="font-semibold">{currentTeam.name}</span>

apps/dashboard/src/app/team/components/TeamHeader/TeamSelectionUI.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,8 @@ export function TeamSelectionUI(props: {
8686
>
8787
<Link href={`/team/${team.slug}`}>
8888
<div className="flex items-center gap-2">
89-
{/* TODO set Image src */}
9089
<GradientAvatar
91-
src={""}
90+
src={team.image || ""}
9291
className="size-4"
9392
id={team.id}
9493
/>

0 commit comments

Comments
 (0)