Skip to content

Commit de96719

Browse files
authored
Merge branch 'main' into yash/ref-constructor-params
2 parents 73e8a79 + 5585def commit de96719

File tree

35 files changed

+148
-35
lines changed

35 files changed

+148
-35
lines changed

.changeset/dirty-cups-tickle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": minor
3+
---
4+
5+
Adds steam auth

.changeset/flat-emus-repeat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Catch localStorage getItem and setItem unhandled errors

.changeset/small-eagles-cry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": minor
3+
---
4+
5+
Adds Steam as an authentication option

apps/dashboard/src/@/components/ui/table.stories.tsx

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import {
99
TableRow,
1010
} from "@/components/ui/table";
1111
import type { Meta, StoryObj } from "@storybook/react";
12+
import Link from "next/link";
1213
import { BadgeContainer, mobileViewport } from "../../../stories/utils";
14+
import { cn } from "../../lib/utils";
1315
import { Badge } from "./badge";
1416

1517
const meta = {
@@ -41,6 +43,10 @@ function Component() {
4143
<TableDemo />
4244
</BadgeContainer>
4345

46+
<BadgeContainer label="Clickable Row">
47+
<TableDemo linkBox />
48+
</BadgeContainer>
49+
4450
<BadgeContainer label="With Footer">
4551
<TableDemo footer />
4652
</BadgeContainer>
@@ -90,6 +96,7 @@ const invoices: Invoice[] = [
9096

9197
function TableDemo(props: {
9298
footer?: boolean;
99+
linkBox?: boolean;
93100
}) {
94101
return (
95102
<TableContainer>
@@ -104,8 +111,21 @@ function TableDemo(props: {
104111
</TableHeader>
105112
<TableBody>
106113
{invoices.map((invoice) => (
107-
<TableRow key={invoice.invoice}>
108-
<TableCell className="font-medium">{invoice.invoice}</TableCell>
114+
<TableRow
115+
key={invoice.invoice}
116+
linkBox={props.linkBox}
117+
className={cn(props.linkBox && "cursor-pointer hover:bg-muted")}
118+
>
119+
<TableCell className="font-medium">
120+
<Link
121+
href={`/invoices/${invoice.invoice}`}
122+
className={cn(
123+
props.linkBox && "before:absolute before:inset-0",
124+
)}
125+
>
126+
{invoice.invoice}
127+
</Link>
128+
</TableCell>
109129
<TableCell>
110130
<Badge>{invoice.paymentStatus}</Badge>
111131
</TableCell>

apps/dashboard/src/@/components/ui/table.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,19 @@ TableFooter.displayName = "TableFooter";
6363

6464
const TableRow = React.forwardRef<
6565
HTMLTableRowElement,
66-
React.HTMLAttributes<HTMLTableRowElement>
67-
>(({ className, ...props }, ref) => (
66+
React.HTMLAttributes<HTMLTableRowElement> & {
67+
/**
68+
* Contain the absolutely position elements inside the row with position:relative + transform:translate(0)
69+
* transform:translate(0) is required because position:relative on tr element does not work on webkit
70+
*/
71+
linkBox?: boolean;
72+
}
73+
>(({ className, linkBox, ...props }, ref) => (
6874
<tr
6975
ref={ref}
7076
className={cn(
7177
"border-border border-b last:border-0 data-[state=selected]:bg-muted",
78+
linkBox && "relative translate-x-0 translate-y-0",
7279
className,
7380
)}
7481
{...props}

apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export async function ChainListRow({
3939
}: ChainListRowProps) {
4040
const chainMetadata = await getChainMetadata(chainId);
4141
return (
42-
<TableRow className="relative hover:bg-muted/50">
42+
<TableRow linkBox className="hover:bg-muted/50">
4343
<TableCell>{favoriteButton}</TableCell>
4444
{/* Name */}
4545
<TableCell>

apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/components/PublishedContractTable.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ function ContractTableRow(props: {
190190
return (
191191
<>
192192
<TableRow
193-
className="relative cursor-pointer hover:bg-muted/50"
193+
linkBox
194+
className="cursor-pointer hover:bg-muted/50"
194195
{...rowProps}
195196
key={key}
196197
>

apps/dashboard/src/app/(dashboard)/trending/components/trending-table.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export function TrendingContractSection(props: {
7575
<TableBody>
7676
{props.topContracts.map((contract, index) => (
7777
<TableRow
78-
className="relative hover:bg-muted/50"
78+
linkBox
79+
className="hover:bg-muted/50"
7980
key={`${contract.chainMetadata.chainId}${contract.contractAddress}${index}`}
8081
>
8182
{/* Rank */}

apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/server/partners-table.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,8 @@ function PartnerRow(props: {
7878

7979
return (
8080
<TableRow
81-
className={cn(
82-
"relative hover:bg-muted/50",
83-
isDeleting && "animate-pulse",
84-
)}
81+
linkBox
82+
className={cn("hover:bg-muted/50", isDeleting && "animate-pulse")}
8583
>
8684
<TableCell className="max-w-32 truncate align-center">
8785
{props.partner.name}

apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const authOptions = [
1212
"telegram",
1313
"github",
1414
"twitch",
15+
"steam",
1516
"apple",
1617
"coinbase",
1718
"line",

0 commit comments

Comments
 (0)