Skip to content

Commit fe08563

Browse files
committed
Merge branch 'main' into yash/infra-deployment
2 parents 3b550ae + 221f95b commit fe08563

File tree

143 files changed

+2141
-1391
lines changed

Some content is hidden

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

143 files changed

+2141
-1391
lines changed

.changeset/rotten-weeks-raise.md

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

.changeset/serious-masks-serve.md

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

apps/dashboard/.env.example

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,8 @@ UNTHREAD_PRO_TIER_ID=""
9696
NEXT_PUBLIC_DEMO_ENGINE_URL=""
9797

9898
# API server secret (required for thirdweb.com SIWE login). Copy from Vercel.
99-
API_SERVER_SECRET=""
99+
API_SERVER_SECRET=""
100+
101+
# Used for the Faucet page (/<chain_id>)
102+
NEXT_PUBLIC_TURNSTILE_SITE_KEY=""
103+
TURNSTILE_SECRET_KEY=""

apps/dashboard/next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const ContentSecurityPolicy = `
88
style-src 'self' 'unsafe-inline' vercel.live;
99
font-src 'self' vercel.live assets.vercel.com framerusercontent.com;
1010
frame-src * data:;
11-
script-src 'self' 'unsafe-eval' 'unsafe-inline' 'wasm-unsafe-eval' 'inline-speculation-rules' *.thirdweb.com *.thirdweb-dev.com vercel.live js.stripe.com framerusercontent.com events.framer.com;
11+
script-src 'self' 'unsafe-eval' 'unsafe-inline' 'wasm-unsafe-eval' 'inline-speculation-rules' *.thirdweb.com *.thirdweb-dev.com vercel.live js.stripe.com framerusercontent.com events.framer.com challenges.cloudflare.com;
1212
connect-src * data: blob:;
1313
worker-src 'self' blob:;
1414
block-all-mixed-content;

apps/dashboard/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"@emotion/react": "11.13.3",
3030
"@emotion/styled": "11.13.0",
3131
"@hookform/resolvers": "^3.9.0",
32+
"@marsidev/react-turnstile": "^1.0.2",
3233
"@n8tb1t/use-scroll-position": "^2.0.3",
3334
"@radix-ui/react-alert-dialog": "^1.1.2",
3435
"@radix-ui/react-avatar": "^1.1.1",

apps/dashboard/src/@/components/blocks/multi-select.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,18 @@ export const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(
119119
if (filteredOptions.length >= itemsToShow) {
120120
break;
121121
}
122+
const option = options[i];
123+
if (!option) {
124+
continue;
125+
}
126+
122127
if (overrideSearchFn) {
123-
if (overrideSearchFn(options[i], searchValLowercase)) {
124-
filteredOptions.push(options[i]);
128+
if (overrideSearchFn(option, searchValLowercase)) {
129+
filteredOptions.push(option);
125130
}
126131
} else {
127-
if (options[i].label.toLowerCase().includes(searchValLowercase)) {
128-
filteredOptions.push(options[i]);
132+
if (option.label.toLowerCase().includes(searchValLowercase)) {
133+
filteredOptions.push(option);
129134
}
130135
}
131136
}

apps/dashboard/src/@/components/blocks/select-with-search.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,18 @@ export const SelectWithSearch = React.forwardRef<
6363
if (filteredOptions.length >= itemsToShow) {
6464
break;
6565
}
66+
const option = options[i];
67+
if (!option) {
68+
continue;
69+
}
6670

6771
if (overrideSearchFn) {
68-
if (overrideSearchFn(options[i], searchValLowercase)) {
69-
filteredOptions.push(options[i]);
72+
if (overrideSearchFn(option, searchValLowercase)) {
73+
filteredOptions.push(option);
7074
}
7175
} else {
72-
if (options[i].label.toLowerCase().includes(searchValLowercase)) {
73-
filteredOptions.push(options[i]);
76+
if (option.label.toLowerCase().includes(searchValLowercase)) {
77+
filteredOptions.push(option);
7478
}
7579
}
7680
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ const ChartTooltipContent = React.forwardRef<
143143
}
144144

145145
const [item] = payload;
146-
const key = `${labelKey || item.dataKey || item.name || "value"}`;
146+
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
147147
const itemConfig = getPayloadConfigFromPayload(config, item, key);
148148
const value =
149149
!labelKey && typeof label === "string"

apps/dashboard/src/@/components/ui/image-upload.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ const ImageUpload = React.forwardRef<HTMLInputElement, ImageUploadProps>(
1616
const [activeFile, setActiveFile] = React.useState<File | null>(null);
1717
const onDrop = React.useCallback(
1818
(acceptedFiles: File[]) => {
19-
setActiveFile(acceptedFiles[0]);
19+
if (acceptedFiles[0]) {
20+
setActiveFile(acceptedFiles[0]);
21+
}
2022
onUpload?.(acceptedFiles);
2123
},
2224
[onUpload],

apps/dashboard/src/@/components/ui/input-otp.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ const InputOTPSlot = React.forwardRef<
3535
React.ComponentPropsWithoutRef<"div"> & { index: number }
3636
>(({ index, className, ...props }, ref) => {
3737
const inputOTPContext = React.useContext(OTPInputContext);
38-
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
38+
// biome-ignore lint/style/noNonNullAssertion: pure shadcn component - it works
39+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]!;
3940

4041
return (
4142
<div
@@ -62,7 +63,7 @@ const InputOTPSeparator = React.forwardRef<
6263
React.ElementRef<"div">,
6364
React.ComponentPropsWithoutRef<"div">
6465
>(({ ...props }, ref) => (
65-
// biome-ignore lint/a11y/useFocusableInteractive: <explanation>
66+
// biome-ignore lint/a11y/useFocusableInteractive: pure shadcn component - it works
6667
<div ref={ref} role="separator" {...props}>
6768
<Dot />
6869
</div>

0 commit comments

Comments
 (0)