Skip to content

Commit 9490d5f

Browse files
committed
Merge remote-tracking branch 'origin/main' into ph/exportSourcesArray
2 parents f6a201d + f1cd253 commit 9490d5f

File tree

110 files changed

+4951
-1785
lines changed

Some content is hidden

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

110 files changed

+4951
-1785
lines changed

.changeset/gold-cobras-switch.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+
Update coinbase wallet sdk

apps/dashboard/redirects.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,12 @@ async function redirects() {
337337
destination: "/connect/account-abstraction",
338338
permanent: false,
339339
},
340+
// redirect /connect/pay to /connect/universal-bridge
341+
{
342+
source: "/connect/pay",
343+
destination: "/connect/universal-bridge",
344+
permanent: false,
345+
},
340346
// PREVIOUS CAMPAIGNS
341347
{
342348
source: "/unlimited-wallets",

apps/dashboard/src/app/login/onboarding/AccountForm.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
88
import { useTrack } from "hooks/analytics/useTrack";
99
import { useState } from "react";
1010
import { useForm } from "react-hook-form";
11+
import { toast } from "sonner";
1112
import {
1213
type AccountValidationSchema,
1314
accountValidationSchema,
@@ -81,15 +82,21 @@ export const AccountForm: React.FC<AccountFormProps> = ({
8182
data,
8283
});
8384
},
84-
onError: (err) => {
85-
const error = err as Error;
85+
onError: (error) => {
86+
console.error(error);
8687

8788
if (
8889
onDuplicateError &&
8990
error?.message.match(/email address already exists/)
9091
) {
9192
onDuplicateError(values.email);
93+
return;
94+
} else if (error.message.includes("INVALID_EMAIL_ADDRESS")) {
95+
toast.error("Invalid Email Address");
96+
} else {
97+
toast.error(error.message || "Failed to update account");
9298
}
99+
93100
trackEvent({
94101
category: "account",
95102
action: "update",

apps/login/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# thirdweb-login
22

3+
## 0.1.3
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`1f6bb7c`](https://github.com/thirdweb-dev/js/commit/1f6bb7c3294d70648b120a6a6a6cba13302a84fc), [`30e13e6`](https://github.com/thirdweb-dev/js/commit/30e13e6b9176265a2f4eddfa53578889abbcb750), [`2dfc245`](https://github.com/thirdweb-dev/js/commit/2dfc245d44dde86e42f6c799305db707316432aa), [`ee57ded`](https://github.com/thirdweb-dev/js/commit/ee57ded902cb69da6fc171599a4a90776e650149), [`9663079`](https://github.com/thirdweb-dev/js/commit/966307906212ac99dc0a2a9be88e514c920d39c4), [`64d7bf3`](https://github.com/thirdweb-dev/js/commit/64d7bf358fe2014b684688d41d525a75e47f1b82)]:
8+
9+
310
## 0.1.2
411

512
### Patch Changes

apps/login/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "thirdweb-login",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"private": true,
55
"scripts": {
66
"preinstall": "npx only-allow pnpm",

apps/playground-web/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
"prelint": "biome check ./src",
1111
"lint": "eslint ./src",
1212
"prefix": "biome check ./src --fix",
13-
"fix": "eslint ./src --fix"
13+
"fix": "eslint ./src --fix",
14+
"typecheck": "tsc --noEmit"
1415
},
1516
"dependencies": {
1617
"@abstract-foundation/agw-client": "^1.4.0",
1718
"@abstract-foundation/agw-react": "^1.5.0",
19+
"@hookform/resolvers": "^3.9.1",
1820
"@radix-ui/react-accordion": "^1.2.2",
1921
"@radix-ui/react-checkbox": "^1.1.3",
2022
"@radix-ui/react-dialog": "1.1.5",
@@ -36,16 +38,20 @@
3638
"lucide-react": "0.474.0",
3739
"next": "15.1.6",
3840
"next-themes": "^0.4.4",
41+
"nextjs-toploader": "^1.6.12",
42+
"openapi-types": "^12.1.3",
3943
"prettier": "3.3.3",
4044
"react": "19.0.0",
4145
"react-dom": "19.0.0",
46+
"react-hook-form": "7.54.2",
4247
"react-pick-color": "^2.0.0",
4348
"server-only": "^0.0.1",
4449
"shiki": "1.27.0",
4550
"tailwind-merge": "^2.6.0",
4651
"thirdweb": "workspace:*",
4752
"timeago.js": "^4.0.2",
48-
"use-debounce": "^10.0.4"
53+
"use-debounce": "^10.0.4",
54+
"zod": "3.24.1"
4955
},
5056
"devDependencies": {
5157
"@types/node": "22.13.0",
51.1 KB
Binary file not shown.

apps/playground-web/src/app/AppSidebar.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
import thirdwebIconSrc from "@/../public/thirdweb.svg";
2-
import { Sidebar } from "@/components/ui/sidebar";
2+
import { Sidebar, type SidebarLink } from "@/components/ui/sidebar";
33
import Image from "next/image";
44
import Link from "next/link";
5-
import { navLinks } from "./navLinks";
5+
import { ScrollShadow } from "../components/ui/ScrollShadow/ScrollShadow";
66
import { otherLinks } from "./otherLinks";
77

8-
export function AppSidebar() {
8+
export function AppSidebar(props: {
9+
links: SidebarLink[];
10+
}) {
911
return (
10-
<div className="sticky top-0 z-10 hidden h-dvh w-[300px] flex-col border-border/50 border-r-2 xl:flex">
11-
<div className="px-6 pt-6">
12-
<Link
13-
className="flex items-center gap-2"
14-
href="/"
15-
aria-label="thirdweb Docs"
16-
title="thirdweb Docs"
17-
>
18-
<Image src={thirdwebIconSrc} className="size-6" alt="" />
12+
<div className="z-10 hidden h-dvh w-[300px] flex-col border-border/50 border-r-2 xl:flex">
13+
<div className="border-b px-6 py-5">
14+
<div className="flex items-center gap-2">
15+
<Image src={thirdwebIconSrc} className="size-6" alt="thirdweb" />
1916
<span className="font-bold text-lg leading-none tracking-tight">
2017
Playground
2118
</span>
22-
</Link>
19+
</div>
2320
</div>
2421

25-
<div className="h-5" />
26-
27-
<div className="px-6">
28-
<Sidebar links={navLinks} />
22+
<div className="relative flex max-h-full flex-1 flex-col overflow-hidden">
23+
<ScrollShadow
24+
className="grow pr-4 pl-6"
25+
scrollableClassName="max-h-full pt-6"
26+
>
27+
<Sidebar links={props.links} />
28+
</ScrollShadow>
2929
</div>
3030

31-
<div className="mt-auto flex flex-col gap-4 p-6">
31+
<div className="mt-auto flex flex-col gap-4 border-t px-6 py-6">
3232
{otherLinks.map((link) => {
3333
return (
3434
<Link

apps/playground-web/src/app/MobileHeader.tsx

Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import { MenuIcon, XIcon } from "lucide-react";
55
import Image from "next/image";
66
import Link from "next/link";
77
import { useEffect, useState } from "react";
8+
import { ScrollShadow } from "../components/ui/ScrollShadow/ScrollShadow";
89
import { Button } from "../components/ui/button";
9-
import { Sidebar } from "../components/ui/sidebar";
10-
import { navLinks } from "./navLinks";
10+
import { Sidebar, type SidebarLink } from "../components/ui/sidebar";
1111
import { otherLinks } from "./otherLinks";
1212

13-
export function MobileHeader() {
13+
export function MobileHeader(props: {
14+
links: SidebarLink[];
15+
}) {
1416
const [isOpen, setIsOpen] = useState(false);
1517

1618
useEffect(() => {
@@ -26,43 +28,53 @@ export function MobileHeader() {
2628
}, [isOpen]);
2729

2830
return (
29-
// biome-ignore lint/a11y/useKeyWithClickEvents: <explanation>
30-
<header
31-
className="sticky top-0 z-10 flex justify-between gap-4 border-b bg-background px-4 py-4 xl:hidden "
32-
onClick={(e) => {
33-
if (e.target instanceof HTMLAnchorElement) {
34-
setIsOpen(false);
35-
}
36-
}}
37-
>
38-
<Link
39-
className="flex items-center gap-3"
40-
href="/"
41-
aria-label="thirdweb Docs"
42-
title="thirdweb Docs"
43-
>
44-
<Image src={thirdwebIconSrc} className="size-7" alt="" />
45-
<span className="font-bold text-xl leading-none tracking-tight">
46-
Playground
47-
</span>
48-
</Link>
49-
<Button
50-
variant="outline"
51-
className="!h-auto p-2"
52-
onClick={() => {
53-
setIsOpen((v) => !v);
54-
}}
55-
>
56-
{!isOpen ? (
57-
<MenuIcon className="size-6" />
58-
) : (
59-
<XIcon className="size-6" />
60-
)}
61-
</Button>
31+
<>
32+
<header className="sticky top-0 z-10 flex justify-between gap-4 border-b bg-background px-4 py-4 xl:hidden">
33+
<Link
34+
className="flex items-center gap-3"
35+
href="/"
36+
aria-label="thirdweb Docs"
37+
title="thirdweb Docs"
38+
>
39+
<Image src={thirdwebIconSrc} className="size-7" alt="" />
40+
<span className="font-bold text-xl leading-none tracking-tight">
41+
Playground
42+
</span>
43+
</Link>
44+
<Button
45+
variant="outline"
46+
className="!h-auto p-2"
47+
onClick={() => {
48+
setIsOpen((v) => !v);
49+
}}
50+
>
51+
{!isOpen ? (
52+
<MenuIcon className="size-6" />
53+
) : (
54+
<XIcon className="size-6" />
55+
)}
56+
</Button>
57+
</header>
58+
6259
{isOpen && (
63-
<div className="fade-in-0 slide-in-from-top-5 fixed top-[75px] right-0 bottom-0 left-0 z-50 flex animate-in flex-col gap-6 overflow-auto bg-background p-6 duration-200">
64-
<Sidebar links={navLinks} />
65-
<div className="mt-auto flex flex-col gap-4">
60+
<div
61+
className="fade-in-0 slide-in-from-top-5 fixed top-[75px] right-0 bottom-0 left-0 z-50 flex animate-in flex-col bg-background duration-200"
62+
onClickCapture={(e) => {
63+
if (e.target instanceof HTMLElement && e.target.closest("a")) {
64+
setIsOpen(false);
65+
}
66+
}}
67+
>
68+
<div className="relative flex max-h-full flex-1 flex-col overflow-hidden">
69+
<ScrollShadow
70+
className="grow px-6"
71+
scrollableClassName="max-h-full pt-6"
72+
>
73+
<Sidebar links={props.links} />
74+
</ScrollShadow>
75+
</div>
76+
77+
<div className="mt-auto flex flex-col gap-4 border-t px-6 py-6">
6678
{otherLinks.map((link) => {
6779
return (
6880
<Link
@@ -78,6 +90,6 @@ export function MobileHeader() {
7890
</div>
7991
</div>
8092
)}
81-
</header>
93+
</>
8294
);
8395
}

apps/playground-web/src/app/connect/sign-in/button/RightSection.tsx

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { abstractWallet } from "@abstract-foundation/agw-react/thirdweb";
22
import { XIcon } from "lucide-react";
3-
import { useRouter } from "next/navigation";
4-
import { useEffect, useMemo } from "react";
3+
import { usePathname } from "next/navigation";
4+
import { useEffect, useState } from "react";
55
import {
66
arbitrumSepolia,
77
baseSepolia,
@@ -25,21 +25,26 @@ import { cn } from "../../../../lib/utils";
2525
import { CodeGen } from "../components/CodeGen";
2626
import type { ConnectPlaygroundOptions } from "../components/types";
2727

28+
type Tab = "modal" | "button" | "code";
29+
2830
export function RightSection(props: {
2931
connectOptions: ConnectPlaygroundOptions;
3032
tab?: string;
3133
}) {
32-
const router = useRouter();
33-
const previewTab = useMemo(
34-
() =>
35-
["modal", "button", "code"].includes(props.tab || "")
36-
? (props.tab as "modal" | "button" | "code")
37-
: "modal",
38-
[props.tab],
39-
);
40-
const setPreviewTab = (tab: "modal" | "button" | "code") => {
41-
router.push(`/connect/sign-in?tab=${tab}`);
42-
};
34+
const pathname = usePathname();
35+
const [previewTab, _setPreviewTab] = useState<Tab>(() => {
36+
return props.tab === "code"
37+
? "code"
38+
: props.tab === "button"
39+
? "button"
40+
: "modal";
41+
});
42+
43+
function setPreviewTab(tab: "modal" | "button" | "code") {
44+
_setPreviewTab(tab);
45+
window.history.replaceState({}, "", `${pathname}?tab=${tab}`);
46+
}
47+
4348
const { connectOptions } = props;
4449
const wallet = useActiveWallet();
4550
const account = useActiveAccount();

0 commit comments

Comments
 (0)