Skip to content

Commit e451797

Browse files
committed
Merge branch 'main' into greg/cnct-2182-analytics-overview-page-build
2 parents 8845151 + 734707e commit e451797

File tree

88 files changed

+7025
-1701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+7025
-1701
lines changed

.changeset/breezy-scissors-scream.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.changeset/real-cars-sell.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
"thirdweb": minor
3+
---
4+
5+
Add SiteLink component for creating wallet-aware links between thirdweb-enabled sites. This component automatically adds wallet connection parameters to the target URL when a wallet is connected, enabling seamless wallet state sharing between sites.
6+
7+
Example:
8+
```tsx
9+
import { SiteLink } from "thirdweb/react";
10+
11+
function App() {
12+
return (
13+
<SiteLink
14+
href="https://thirdweb.com"
15+
client={thirdwebClient}
16+
ecosystem={{ id: "ecosystem.thirdweb" }}
17+
>
18+
Visit thirdweb.com with connected wallet
19+
</SiteLink>
20+
);
21+
}
22+
```

apps/dashboard/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"preinstall": "npx only-allow pnpm",
7-
"dev": "next dev --turbopack",
7+
"dev": "next dev",
88
"build": "next build",
99
"start": "next start",
1010
"format": "biome format ./src --write",
@@ -30,6 +30,7 @@
3030
"@hookform/resolvers": "^3.9.1",
3131
"@marsidev/react-turnstile": "^1.0.2",
3232
"@n8tb1t/use-scroll-position": "^2.0.3",
33+
"@radix-ui/react-accordion": "^1.2.1",
3334
"@radix-ui/react-alert-dialog": "^1.1.2",
3435
"@radix-ui/react-avatar": "^1.1.1",
3536
"@radix-ui/react-checkbox": "^1.1.2",
@@ -45,7 +46,7 @@
4546
"@radix-ui/react-slot": "^1.1.0",
4647
"@radix-ui/react-switch": "^1.1.1",
4748
"@radix-ui/react-tooltip": "1.1.3",
48-
"@sentry/nextjs": "8.36.0",
49+
"@sentry/nextjs": "8.37.1",
4950
"@shazow/whatsabi": "^0.16.0",
5051
"@stripe/react-stripe-js": "^2.8.1",
5152
"@stripe/stripe-js": "^3.5.0",

apps/dashboard/src/@/components/blocks/FormFieldSetup.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export function FormFieldSetup(props: {
99
children: React.ReactNode;
1010
tooltip?: React.ReactNode;
1111
isRequired: boolean;
12+
helperText?: React.ReactNode;
1213
}) {
1314
return (
1415
<div>
@@ -26,8 +27,13 @@ export function FormFieldSetup(props: {
2627
)}
2728
</div>
2829
{props.children}
30+
31+
{props.helperText && (
32+
<p className="mt-2 text-muted-foreground text-sm">{props.helperText}</p>
33+
)}
34+
2935
{props.errorMessage && (
30-
<p className="mt-1 text-destructive-text text-sm">
36+
<p className="mt-2 text-destructive-text text-sm">
3137
{props.errorMessage}
3238
</p>
3339
)}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ export function DatePickerWithRange(props: {
6969
<DynamicHeight>
7070
<div>
7171
{!isValid && (
72-
<p className="flex items-center justify-center gap-2 pt-2 text-center text-destructive-text text-sm">
72+
<p className="flex items-center justify-center gap-2 py-2 text-center text-destructive-text text-sm">
7373
<CalendarX2Icon className="h-4 w-4" />
7474
Invalid date range
7575
</p>
7676
)}
7777
{props.header}
7878

79-
<div className="px-4">
79+
<div className={cn("px-4", !props.header && "py-4")}>
8080
<TabButtons
8181
tabClassName="!text-sm"
8282
activeTabClassName="!bg-inverted !text-inverted-foreground"
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
"use client";
2+
3+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
4+
import { ChevronDown } from "lucide-react";
5+
import * as React from "react";
6+
7+
import { cn } from "@/lib/utils";
8+
9+
const Accordion = AccordionPrimitive.Root;
10+
11+
const AccordionItem = React.forwardRef<
12+
React.ElementRef<typeof AccordionPrimitive.Item>,
13+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
14+
>(({ className, ...props }, ref) => (
15+
<AccordionPrimitive.Item
16+
ref={ref}
17+
className={cn("border-border border-b", className)}
18+
{...props}
19+
/>
20+
));
21+
AccordionItem.displayName = "AccordionItem";
22+
23+
const AccordionTrigger = React.forwardRef<
24+
React.ElementRef<typeof AccordionPrimitive.Trigger>,
25+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
26+
>(({ className, children, ...props }, ref) => (
27+
<AccordionPrimitive.Header className="flex">
28+
<AccordionPrimitive.Trigger
29+
ref={ref}
30+
className={cn(
31+
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
32+
className,
33+
)}
34+
{...props}
35+
>
36+
{children}
37+
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
38+
</AccordionPrimitive.Trigger>
39+
</AccordionPrimitive.Header>
40+
));
41+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
42+
43+
const AccordionContent = React.forwardRef<
44+
React.ElementRef<typeof AccordionPrimitive.Content>,
45+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
46+
>(({ className, children, ...props }, ref) => (
47+
<AccordionPrimitive.Content
48+
ref={ref}
49+
className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
50+
{...props}
51+
>
52+
<div className={cn("pt-0 pb-4", className)}>{children}</div>
53+
</AccordionPrimitive.Content>
54+
));
55+
56+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
57+
58+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,7 @@ const SelectContent = React.forwardRef<
7373
>(({ className, children, position = "popper", ...props }, ref) => (
7474
<SelectPrimitive.Portal>
7575
<SelectPrimitive.Content
76-
// Fixes https://github.com/radix-ui/primitives/issues/1658
77-
ref={(instance) => {
78-
if (typeof ref === "function") {
79-
ref(instance);
80-
} else if (ref) {
81-
ref.current = instance;
82-
}
83-
if (!instance) return;
84-
85-
instance.ontouchstart = (e) => {
86-
e.preventDefault();
87-
};
88-
}}
76+
ref={ref}
8977
className={cn(
9078
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
9179
position === "popper" &&

apps/dashboard/src/@/constants/thirdweb.client.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ export function useThirdwebClient(jwt?: string) {
2424
throw new Error("Failed to get auth token");
2525
}
2626
const json = (await res.json()) as GetAuthTokenResponse;
27-
return json.jwt || undefined;
27+
if (!json.jwt) {
28+
throw new Error("No JWT in response");
29+
}
30+
return json.jwt;
2831
},
2932
});
3033

apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { popularChains } from "../popularChains";
3434
export const CustomConnectWallet = (props: {
3535
loginRequired?: boolean;
3636
connectButtonClassName?: string;
37+
signInLinkButtonClassName?: string;
3738
detailsButtonClassName?: string;
3839
}) => {
3940
const thirdwebClient = useThirdwebClient();
@@ -134,7 +135,12 @@ export const CustomConnectWallet = (props: {
134135
if (!isLoggedIn && loginRequired) {
135136
return (
136137
<>
137-
<Button asChild variant="default" className="gap-2" size="lg">
138+
<Button
139+
asChild
140+
variant="default"
141+
className={props.signInLinkButtonClassName}
142+
size="lg"
143+
>
138144
<Link
139145
href={`/login${pathname ? `?next=${encodeURIComponent(pathname)}` : ""}`}
140146
>

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/Inputs/MaxClaimablePerWalletInput.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ export const MaxClaimablePerWalletInput: React.FC = () => {
5454
<QuantityInputWithUnlimited
5555
isRequired
5656
decimals={tokenDecimals}
57-
isDisabled={dropType === "specific" || formDisabled}
57+
isDisabled={
58+
dropType === "specific" || formDisabled || (isErc20 && !tokenDecimals)
59+
}
5860
value={field?.maxClaimablePerWallet?.toString() || "0"}
5961
onChange={(value) =>
6062
form.setValue(

0 commit comments

Comments
 (0)