Skip to content

Commit 36a2de7

Browse files
authored
Merge branch 'main' into yash/ref-constructor-params
2 parents 10be49d + 406c885 commit 36a2de7

File tree

41 files changed

+160
-1598
lines changed

Some content is hidden

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

41 files changed

+160
-1598
lines changed

.github/workflows/issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [opened, edited]
66

77
env:
8-
VALID_ISSUE_PREFIXES: "CNCT|DASH"
8+
VALID_ISSUE_PREFIXES: "CNCT|DASH|PROT"
99

1010
jobs:
1111
linear:

apps/dashboard/framer-rewrites.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ module.exports = [
2828
// -- TPP --
2929
"/trusted-partner-program",
3030
"/trusted-partner-program/:partner_slug",
31+
// -- legal --
32+
"/terms",
33+
"/privacy-policy",
3134
];

apps/dashboard/redirects.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,24 @@ async function redirects() {
301301
destination: "/community/ambassadors",
302302
permanent: false,
303303
},
304+
// redirect `/tos` to `/terms`
305+
{
306+
source: "/tos",
307+
destination: "/terms",
308+
permanent: false,
309+
},
310+
// redirect `/privacy` to `/privacy-policy`
311+
{
312+
source: "/privacy",
313+
destination: "/privacy-policy",
314+
permanent: false,
315+
},
316+
// redirect `/mission` to `/home`
317+
{
318+
source: "/mission",
319+
destination: "/home",
320+
permanent: false,
321+
},
304322
...legacyDashboardToTeamRedirects,
305323
];
306324
}

apps/dashboard/src/@/components/blocks/app-footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ export function AppFooter(props: AppFooterProps) {
107107
</Link>
108108
<Link
109109
className="px-[10px] py-[6px] text-muted-foreground text-sm hover:underline"
110-
href="https://thirdweb.com/privacy"
110+
href="https://thirdweb.com/privacy-policy"
111111
target="_blank"
112112
>
113113
Privacy Policy
114114
</Link>
115115
<Link
116116
className="px-[10px] py-[6px] text-muted-foreground text-sm hover:underline"
117-
href="https://thirdweb.com/tos"
117+
href="https://thirdweb.com/terms"
118118
target="_blank"
119119
>
120120
Terms of Service

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ export const CustomConnectWallet = (props: {
163163
theme={getSDKTheme(t)}
164164
client={thirdwebClient}
165165
connectModal={{
166-
privacyPolicyUrl: "/privacy",
167-
termsOfServiceUrl: "/tos",
166+
privacyPolicyUrl: "/privacy-policy",
167+
termsOfServiceUrl: "/terms",
168168
showThirdwebBranding: false,
169169
welcomeScreen: () => <ConnectWalletWelcomeScreen theme={t} />,
170170
}}
@@ -308,8 +308,8 @@ export function useCustomConnectModal() {
308308
url: "https://thirdweb.com",
309309
},
310310
chain: options?.chain,
311-
privacyPolicyUrl: "/privacy",
312-
termsOfServiceUrl: "/tos",
311+
privacyPolicyUrl: "/privacy-policy",
312+
termsOfServiceUrl: "/terms",
313313
showThirdwebBranding: false,
314314
welcomeScreen: () => (
315315
<ConnectWalletWelcomeScreen

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/explorer/ContractExplorerPage.tsx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
2-
import { Flex } from "@chakra-ui/react";
32
import type { Abi } from "abitype";
43
import { getContractFunctionsFromAbi } from "components/contract-components/getContractFunctionsFromAbi";
54
import { ContractFunctionsOverview } from "components/contract-functions/contract-functions";
@@ -33,26 +32,24 @@ export const ContractExplorerPage: React.FC<ContractExplorePageProps> = ({
3332

3433
const functions = getContractFunctionsFromAbi(abi);
3534
return (
36-
<Flex direction="column" h="70vh">
35+
<div className="flex h-[70vh] flex-col">
3736
{functions && functions.length > 0 ? (
3837
<ContractFunctionsOverview
3938
onlyFunctions
4039
functions={functions}
4140
contract={contract}
4241
/>
4342
) : (
44-
<div className="flex items-center justify-center">
45-
<Flex direction="column" textAlign="center" gap={2}>
46-
<h2 className="font-semibold text-2xl tracking-tight">
47-
No callable functions discovered in ABI.
48-
</h2>
49-
<p className="text-muted-foreground text-sm">
50-
Please note that proxy contracts are not yet supported in the
51-
explorer, check back soon for full proxy support.
52-
</p>
53-
</Flex>
43+
<div className="flex flex-col items-center justify-center gap-2 text-center">
44+
<h2 className="font-semibold text-2xl tracking-tight">
45+
No callable functions discovered in ABI.
46+
</h2>
47+
<p className="text-muted-foreground text-sm">
48+
Please note that proxy contracts are not yet supported in the
49+
explorer, check back soon for full proxy support.
50+
</p>
5451
</div>
5552
)}
56-
</Flex>
53+
</div>
5754
);
5855
};

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/airdrop-tab.tsx

Lines changed: 35 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
SheetTitle,
99
SheetTrigger,
1010
} from "@/components/ui/sheet";
11-
import { Flex } from "@chakra-ui/react";
11+
import { cn } from "@/lib/utils";
1212
import { TransactionButton } from "components/buttons/TransactionButton";
1313
import { useTrack } from "hooks/analytics/useTrack";
1414
import { UploadIcon } from "lucide-react";
@@ -114,44 +114,41 @@ const AirdropTab: React.FC<AirdropTabProps> = ({ contract, tokenId }) => {
114114
})}
115115
>
116116
<div className="flex flex-col gap-2">
117-
<div className="mb-3 flex w-full flex-col gap-6 md:flex-row">
118-
<Flex direction={{ base: "column", md: "row" }} gap={4}>
119-
<Sheet open={open} onOpenChange={setOpen}>
120-
<SheetTrigger asChild>
121-
<Button variant="primary" className="gap-2">
122-
Upload addresses <UploadIcon className="size-4" />
123-
</Button>
124-
</SheetTrigger>
125-
<SheetContent className="w-full overflow-y-auto sm:min-w-[540px] lg:min-w-[700px]">
126-
<SheetHeader>
127-
<SheetTitle className="mb-5 text-left">
128-
Airdrop NFTs
129-
</SheetTitle>
130-
</SheetHeader>
131-
<AirdropUpload
132-
onClose={() => setOpen(false)}
133-
setAirdrop={(value) =>
134-
setValue("addresses", value, { shouldDirty: true })
135-
}
136-
/>
137-
</SheetContent>
138-
</Sheet>
117+
<div className="mb-3 flex w-full flex-col gap-4 md:flex-row">
118+
<Sheet open={open} onOpenChange={setOpen}>
119+
<SheetTrigger asChild>
120+
<Button variant="primary" className="gap-2">
121+
Upload addresses <UploadIcon className="size-4" />
122+
</Button>
123+
</SheetTrigger>
124+
<SheetContent className="w-full overflow-y-auto sm:min-w-[540px] lg:min-w-[700px]">
125+
<SheetHeader>
126+
<SheetTitle className="mb-5 text-left">
127+
Airdrop NFTs
128+
</SheetTitle>
129+
</SheetHeader>
130+
<AirdropUpload
131+
onClose={() => setOpen(false)}
132+
setAirdrop={(value) =>
133+
setValue("addresses", value, { shouldDirty: true })
134+
}
135+
/>
136+
</SheetContent>
137+
</Sheet>
139138

140-
<Flex
141-
gap={2}
142-
direction="row"
143-
align="center"
144-
justify="center"
145-
color={addresses.length === 0 ? "orange.500" : "green.500"}
146-
>
147-
{addresses.length > 0 && (
148-
<p>
149-
<strong>{addresses.length} addresses</strong> ready to be
150-
airdropped
151-
</p>
152-
)}
153-
</Flex>
154-
</Flex>
139+
<div
140+
className={cn("flex flex-row items-center justify-center gap-2", {
141+
"text-orange-500": addresses.length === 0,
142+
"text-green-500": addresses.length > 0,
143+
})}
144+
>
145+
{addresses.length > 0 && (
146+
<p>
147+
<strong>{addresses.length} addresses</strong> ready to be
148+
airdropped
149+
</p>
150+
)}
151+
</div>
155152
</div>
156153
<p>
157154
You can airdrop to a maximum of 250 addresses at a time. If you have

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/nft-property.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Flex } from "@chakra-ui/react";
21
import { Card, Text } from "tw-components";
32

43
interface NftPropertyProps {
@@ -8,7 +7,7 @@ interface NftPropertyProps {
87

98
export const NftProperty: React.FC<NftPropertyProps> = ({ property }) => {
109
return (
11-
<Card as={Flex} flexDir="column" gap={2}>
10+
<Card className="flex flex-col gap-2">
1211
{property?.trait_type && (
1312
<Text
1413
size="label.sm"

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal.tsx

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
tokensDelegated,
55
votingTokenDecimals,
66
} from "@3rdweb-sdk/react/hooks/useVote";
7-
import { Flex } from "@chakra-ui/react";
87
import { TransactionButton } from "components/buttons/TransactionButton";
98
import { CheckIcon, MinusIcon, XIcon } from "lucide-react";
109
import { useState } from "react";
@@ -81,22 +80,19 @@ export const Proposal: React.FC<IProposal> = ({ proposal, contract }) => {
8180

8281
return (
8382
<Card key={proposal.proposalId.toString()}>
84-
<Flex mb="8px">
85-
<Flex
86-
paddingY="0px"
87-
paddingX="16px"
88-
borderRadius="25px"
89-
bg={
83+
<div
84+
className="mb-2 rounded-md bg-gray-500 px-4 py-0"
85+
style={{
86+
background:
9087
ProposalStateToMetadataMap[
9188
proposal.stateLabel as keyof typeof VoteExt.ProposalState
92-
] || "gray.500"
93-
}
94-
>
95-
<Text color="white">
96-
{`${proposal.stateLabel?.charAt(0).toUpperCase()}${proposal.stateLabel?.slice(1)}`}
97-
</Text>
98-
</Flex>
99-
</Flex>
89+
] || undefined,
90+
}}
91+
>
92+
<Text color="white">
93+
{`${proposal.stateLabel?.charAt(0).toUpperCase()}${proposal.stateLabel?.slice(1)}`}
94+
</Text>
95+
</div>
10096
<Text>
10197
<strong>Proposal:</strong> {proposal.description}
10298
</Text>
@@ -134,7 +130,7 @@ export const Proposal: React.FC<IProposal> = ({ proposal, contract }) => {
134130
!hasVotedQuery.data &&
135131
!hasVotedQuery.isPending &&
136132
tokensDelegatedQuery.data ? (
137-
<Flex mt="24px" gap={2}>
133+
<div className="mt-6 flex gap-2">
138134
<TransactionButton
139135
txChainID={contract.chain.id}
140136
size="sm"
@@ -175,7 +171,7 @@ export const Proposal: React.FC<IProposal> = ({ proposal, contract }) => {
175171
Abstain
176172
</div>
177173
</TransactionButton>
178-
</Flex>
174+
</div>
179175
) : (
180176
canExecuteQuery.data && (
181177
<Button

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/ContractTokensPage.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"use client";
2-
3-
import { Flex } from "@chakra-ui/react";
42
import type { ThirdwebContract } from "thirdweb";
53
import { Card, Heading, LinkButton, Text } from "tw-components";
64
import { TokenAirdropButton } from "./components/airdrop-button";
@@ -25,7 +23,7 @@ export const ContractTokensPage: React.FC<ContractTokenPageProps> = ({
2523
}) => {
2624
if (!isERC20) {
2725
return (
28-
<Card as={Flex} flexDir="column" gap={3}>
26+
<Card className="flex flex-col gap-3">
2927
{/* TODO extract this out into it's own component and make it better */}
3028
<Heading size="subtitle.md">No Token extension enabled</Heading>
3129
<Text>
@@ -46,7 +44,7 @@ export const ContractTokensPage: React.FC<ContractTokenPageProps> = ({
4644
}
4745

4846
return (
49-
<Flex direction="column" gap={6}>
47+
<div className="flex flex-col gap-6">
5048
<div className="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
5149
<Heading size="title.sm">Contract Tokens</Heading>
5250
<div className="flex flex-col gap-3 md:flex-row">
@@ -59,6 +57,6 @@ export const ContractTokensPage: React.FC<ContractTokenPageProps> = ({
5957
</div>
6058

6159
<TokenSupply contract={contract} />
62-
</Flex>
60+
</div>
6361
);
6462
};

0 commit comments

Comments
 (0)