Jd/cleanup (#2258)
* remove unused gql queries * remove generated file * init knip * run knip and remove unused * lock --------- Co-authored-by: Joaquim Verges <[email protected]>
This commit is contained in:
co-authored by
Joaquim Verges
parent
68aed6357f
commit
0c0cfdad84
+1
-1
@@ -74,6 +74,6 @@ public/sitemap*.xml
|
||||
future_app/
|
||||
|
||||
# generated files
|
||||
graphql/**/__generated__/
|
||||
graphql/generated.ts
|
||||
# Sentry Config File
|
||||
.sentryclirc
|
||||
|
||||
@@ -17,11 +17,11 @@ export type EVMContractInfo = {
|
||||
|
||||
type SetEVMContractInfo = (info: EVMContractInfo) => void;
|
||||
|
||||
export const EVMContractInfoContext = createContext<
|
||||
const EVMContractInfoContext = createContext<
|
||||
EVMContractInfo | undefined
|
||||
>(undefined);
|
||||
|
||||
export const SetEVMContractInfoContext = createContext<
|
||||
const SetEVMContractInfoContext = createContext<
|
||||
SetEVMContractInfo | undefined
|
||||
>(undefined);
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ export type Account = {
|
||||
};
|
||||
};
|
||||
|
||||
export interface UpdateAccountInput {
|
||||
interface UpdateAccountInput {
|
||||
name?: string;
|
||||
email?: string;
|
||||
plan?: AccountPlan;
|
||||
@@ -69,21 +69,21 @@ export interface UpdateAccountInput {
|
||||
onboardSkipped?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateAccountNotificationsInput {
|
||||
interface UpdateAccountNotificationsInput {
|
||||
billing: "email" | "none";
|
||||
updates: "email" | "none";
|
||||
}
|
||||
|
||||
export interface ConfirmEmailInput {
|
||||
interface ConfirmEmailInput {
|
||||
confirmationToken: string;
|
||||
}
|
||||
|
||||
export type ApiKeyRecoverShareManagement = "AWS_MANAGED" | "USER_MANAGED";
|
||||
export type ApiKeyCustomAuthentication = {
|
||||
type ApiKeyRecoverShareManagement = "AWS_MANAGED" | "USER_MANAGED";
|
||||
type ApiKeyCustomAuthentication = {
|
||||
jwksUri: string;
|
||||
aud: string;
|
||||
};
|
||||
export type ApiKeyCustomAuthEndpoint = {
|
||||
type ApiKeyCustomAuthEndpoint = {
|
||||
authEndpoint: string;
|
||||
customHeaders: { key: string; value: string }[];
|
||||
};
|
||||
@@ -154,13 +154,13 @@ export type ApiKey = {
|
||||
services?: ApiKeyService[];
|
||||
};
|
||||
|
||||
export interface UpdateKeyServiceInput {
|
||||
interface UpdateKeyServiceInput {
|
||||
name: string;
|
||||
targetAddresses: string[];
|
||||
actions?: string[];
|
||||
}
|
||||
|
||||
export interface CreateKeyInput {
|
||||
interface CreateKeyInput {
|
||||
name?: string;
|
||||
domains?: string[];
|
||||
bundleIds?: string[];
|
||||
@@ -168,7 +168,7 @@ export interface CreateKeyInput {
|
||||
services?: UpdateKeyServiceInput[];
|
||||
}
|
||||
|
||||
export interface UpdateKeyInput {
|
||||
interface UpdateKeyInput {
|
||||
id: string;
|
||||
name: string;
|
||||
domains: string[];
|
||||
@@ -177,20 +177,20 @@ export interface UpdateKeyInput {
|
||||
services?: UpdateKeyServiceInput[];
|
||||
}
|
||||
|
||||
export interface UsageBundler {
|
||||
interface UsageBundler {
|
||||
chainId: number;
|
||||
sumTransactionFee: string;
|
||||
}
|
||||
|
||||
export interface UsageStorage {
|
||||
interface UsageStorage {
|
||||
sumFileSizeBytes: number;
|
||||
}
|
||||
|
||||
export interface UsageEmbeddedWallets {
|
||||
interface UsageEmbeddedWallets {
|
||||
countWalletAddresses: number;
|
||||
}
|
||||
|
||||
export interface UsageCheckout {
|
||||
interface UsageCheckout {
|
||||
sumTransactionFeeUsd: number;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ export interface UsageBillableByService {
|
||||
};
|
||||
}
|
||||
|
||||
export interface WalletStats {
|
||||
interface WalletStats {
|
||||
timeSeries: {
|
||||
dayTime: string;
|
||||
clientId: string;
|
||||
@@ -752,7 +752,7 @@ export function useRevokeApiKey() {
|
||||
);
|
||||
}
|
||||
|
||||
export function useGenerateApiKey() {
|
||||
function useGenerateApiKey() {
|
||||
const { user } = useLoggedInUser();
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
@@ -1036,7 +1036,7 @@ export function useApiAuthToken() {
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export async function fetchApiKeyAvailability(name: string) {
|
||||
async function fetchApiKeyAvailability(name: string) {
|
||||
const res = await fetch(
|
||||
`${THIRDWEB_API_HOST}/v1/keys/availability?name=${name}`,
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import { ValidContractInstance } from "@thirdweb-dev/sdk";
|
||||
import { constants } from "ethers";
|
||||
|
||||
export function isContractWithRoles(
|
||||
function isContractWithRoles(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
): contract is ContractWithRoles {
|
||||
if (contract && "roles" in contract) {
|
||||
@@ -18,7 +18,7 @@ export function isContractWithRoles(
|
||||
return false;
|
||||
}
|
||||
|
||||
export function useIsAccountRole<TContract extends ContractWithRoles>(
|
||||
function useIsAccountRole<TContract extends ContractWithRoles>(
|
||||
role: RolesForContract<TContract>[number],
|
||||
contract: RequiredParam<TContract>,
|
||||
account: RequiredParam<string>,
|
||||
|
||||
@@ -135,7 +135,7 @@ export type Transaction = {
|
||||
functionArgs?: string | null;
|
||||
};
|
||||
|
||||
export type TransactionResponse = {
|
||||
type TransactionResponse = {
|
||||
transactions: Transaction[];
|
||||
totalCount: number;
|
||||
};
|
||||
@@ -172,7 +172,7 @@ export function useEngineTransactions(instance: string, autoUpdate: boolean) {
|
||||
);
|
||||
}
|
||||
|
||||
export type WalletConfig =
|
||||
type WalletConfig =
|
||||
| {
|
||||
type: "local";
|
||||
}
|
||||
@@ -213,7 +213,7 @@ export function useEngineWalletConfig(instance: string) {
|
||||
);
|
||||
}
|
||||
|
||||
export type CurrencyValue = {
|
||||
type CurrencyValue = {
|
||||
name: string;
|
||||
symbol: string;
|
||||
decimals: number;
|
||||
@@ -389,7 +389,7 @@ export function useEngineCreateRelayer(instance: string) {
|
||||
);
|
||||
}
|
||||
|
||||
export type RevokeRelayerInput = {
|
||||
type RevokeRelayerInput = {
|
||||
id: string;
|
||||
};
|
||||
|
||||
@@ -771,7 +771,7 @@ export function useEngineRevokePermissions(instance: string) {
|
||||
);
|
||||
}
|
||||
|
||||
export type CreateAccessTokenResponse = AccessToken & {
|
||||
type CreateAccessTokenResponse = AccessToken & {
|
||||
accessToken: string;
|
||||
};
|
||||
|
||||
|
||||
@@ -34,35 +34,23 @@ import { BaseContract } from "ethers";
|
||||
import {
|
||||
InsertWebhookMutationVariables,
|
||||
useInsertWebhookMutation,
|
||||
} from "graphql/mutations/__generated__/InsertWebhook.generated";
|
||||
import { useUpdateSellerMutation } from "graphql/mutations/__generated__/UpdateSeller.generated";
|
||||
import {
|
||||
useUpdateSellerMutation,
|
||||
UpdateWebhookMutationVariables,
|
||||
useUpdateWebhookMutation,
|
||||
} from "graphql/mutations/__generated__/UpdateWebhook.generated";
|
||||
import { ApiSecretKeysByOwnerIdQuery } from "graphql/queries/__generated__/ApiSecretKeysByOwnerId.generated";
|
||||
import {
|
||||
ApiSecretKeysByOwnerIdQuery,
|
||||
CheckoutsByContractAddressQueryVariables,
|
||||
useCheckoutsByContractAddressLazyQuery,
|
||||
} from "graphql/queries/__generated__/CheckoutsByContractAddress.generated";
|
||||
import {
|
||||
ContractsByOwnerIdQueryVariables,
|
||||
useContractsByOwnerIdLazyQuery,
|
||||
} from "graphql/queries/__generated__/ContractsByOwnerId.generated";
|
||||
import {
|
||||
DetailedAnalyticsQueryVariables,
|
||||
useDetailedAnalyticsLazyQuery,
|
||||
} from "graphql/queries/__generated__/DetailedAnalytics.generated";
|
||||
import {
|
||||
SellerDocument,
|
||||
SellerQueryVariables,
|
||||
useSellerLazyQuery,
|
||||
} from "graphql/queries/__generated__/Seller.generated";
|
||||
import {
|
||||
WebhooksBySellerIdDocument,
|
||||
WebhooksBySellerIdQueryVariables,
|
||||
useWebhooksBySellerIdLazyQuery,
|
||||
} from "graphql/queries/__generated__/WebhooksBySellerId.generated";
|
||||
} from "graphql/generated";
|
||||
import { getEVMThirdwebSDK } from "lib/sdk";
|
||||
import invariant from "tiny-invariant";
|
||||
import { OtherAddressZero } from "utils/zeroAddress";
|
||||
@@ -70,7 +58,7 @@ import { paymentsKeys } from "../cache-keys";
|
||||
import { useMutationWithInvalidate } from "./query/useQueryWithNetwork";
|
||||
import { useApiAuthToken } from "./useApi";
|
||||
|
||||
export const paymentsExtensions: FeatureName[] = [
|
||||
const paymentsExtensions: FeatureName[] = [
|
||||
"ERC721SharedMetadata",
|
||||
"ERC721ClaimPhasesV2",
|
||||
"ERC721ClaimConditionsV2",
|
||||
@@ -78,7 +66,7 @@ export const paymentsExtensions: FeatureName[] = [
|
||||
"ERC1155ClaimPhasesV2",
|
||||
];
|
||||
|
||||
export const hasPaymentsDetectedExtensions = (
|
||||
const hasPaymentsDetectedExtensions = (
|
||||
contract: SmartContract<BaseContract> | undefined,
|
||||
) => {
|
||||
return detectFeatures(contract, paymentsExtensions);
|
||||
@@ -97,7 +85,7 @@ export const validPaymentsChainIdsMainnets: number[] = [
|
||||
ArbitrumNova.chainId,
|
||||
];
|
||||
|
||||
export const validPaymentsChainIdsTestnets: number[] = [
|
||||
const validPaymentsChainIdsTestnets: number[] = [
|
||||
Goerli.chainId,
|
||||
Sepolia.chainId,
|
||||
Mumbai.chainId,
|
||||
@@ -120,7 +108,7 @@ export const validPaymentsChainIds: number[] = [
|
||||
];
|
||||
|
||||
// type for validcheckoutchainids
|
||||
export type PaymentChainId = (typeof validPaymentsChainIds)[number];
|
||||
type PaymentChainId = (typeof validPaymentsChainIds)[number];
|
||||
|
||||
const ChainIdToPaperChain: Record<PaymentChainId, string> = {
|
||||
[Ethereum.chainId]: "Ethereum",
|
||||
@@ -245,7 +233,7 @@ export const ChainIdToSupportedCurrencies: Record<number, CurrencyMetadata[]> =
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
export type RegisterContractInput = {
|
||||
type RegisterContractInput = {
|
||||
chain: string;
|
||||
contractAddress: string;
|
||||
contractType?: "CUSTOM_CONTRACT" | "THIRDWEB";
|
||||
@@ -466,7 +454,7 @@ export function usePaymentsCreateUpdateCheckout(contractAddress: string) {
|
||||
);
|
||||
}
|
||||
|
||||
export type RemoveCheckoutInput = {
|
||||
type RemoveCheckoutInput = {
|
||||
checkoutId: string;
|
||||
};
|
||||
|
||||
@@ -498,10 +486,6 @@ export function usePaymentsRemoveCheckout(contractAddress: string) {
|
||||
);
|
||||
}
|
||||
|
||||
export type UploadKybFileInput = {
|
||||
file: File;
|
||||
};
|
||||
|
||||
export function usePaymentsUploadKybFiles() {
|
||||
const { token } = useApiAuthToken();
|
||||
const fetchFromPaymentsAPI = usePaymentsApi();
|
||||
@@ -641,7 +625,7 @@ export type SellerValueInput = {
|
||||
is_sole_proprietor: boolean;
|
||||
};
|
||||
|
||||
export type UpdateSellerByIdInput = {
|
||||
type UpdateSellerByIdInput = {
|
||||
id: string;
|
||||
sellerValue: SellerValueInput;
|
||||
};
|
||||
@@ -801,7 +785,7 @@ export function usePaymentsCheckoutsByContract(contractAddress: string) {
|
||||
);
|
||||
}
|
||||
|
||||
export enum PaymentMethod {
|
||||
enum PaymentMethod {
|
||||
NATIVE_MINT = "NATIVE_MINT",
|
||||
BUY_WITH_CARD = "BUY_WITH_CARD",
|
||||
BUY_WITH_BANK = "BUY_WITH_BANK",
|
||||
@@ -811,7 +795,7 @@ export enum PaymentMethod {
|
||||
BUY_WITH_IDEAL = "BUY_WITH_IDEAL",
|
||||
}
|
||||
|
||||
export const PaymentMethodToText: Record<PaymentMethod, string> = {
|
||||
const PaymentMethodToText: Record<PaymentMethod, string> = {
|
||||
[PaymentMethod.BUY_WITH_CARD]: "Card",
|
||||
[PaymentMethod.BUY_WITH_BANK]: "Bank Account",
|
||||
[PaymentMethod.BUY_WITH_CRYPTO]: "Other Crypto",
|
||||
@@ -821,7 +805,7 @@ export const PaymentMethodToText: Record<PaymentMethod, string> = {
|
||||
[PaymentMethod.BUY_WITH_IDEAL]: "iDEAL",
|
||||
};
|
||||
|
||||
export enum FiatCurrency {
|
||||
enum FiatCurrency {
|
||||
USD = "USD",
|
||||
EUR = "EUR",
|
||||
JPY = "JPY",
|
||||
@@ -836,7 +820,7 @@ export enum FiatCurrency {
|
||||
|
||||
const WALLET_TYPE = "wallet_type";
|
||||
const PAYMENT_METHOD = "payment_method";
|
||||
export function parseAnalyticOverviewData(data: any[]): any[] {
|
||||
function parseAnalyticOverviewData(data: any[]): any[] {
|
||||
const result: { [checkout_id: string]: any } = {};
|
||||
|
||||
for (const item of data) {
|
||||
@@ -1028,7 +1012,7 @@ export function usePaymentsCreateWebhook(paymentsSellerId: string) {
|
||||
);
|
||||
}
|
||||
|
||||
export type UpdateWebhookInput = {
|
||||
type UpdateWebhookInput = {
|
||||
webhookId: string;
|
||||
url?: string;
|
||||
deletedAt?: Date;
|
||||
@@ -1065,13 +1049,6 @@ export function usePaymentsUpdateWebhook(paymentsSellerId: string) {
|
||||
);
|
||||
}
|
||||
|
||||
export type PaymentsWebhookSecretType = {
|
||||
id: string;
|
||||
ownerId: string;
|
||||
createdAt: string;
|
||||
hashedKey: string;
|
||||
};
|
||||
|
||||
export function usePaymentsWebhooksSecretKeyById(paymentsSellerId: string) {
|
||||
const { token } = useApiAuthToken();
|
||||
const fetchFromPaymentsAPI = usePaymentsApi();
|
||||
|
||||
@@ -171,7 +171,7 @@ export function useMainnetsContractList(walletAddress: string | undefined) {
|
||||
};
|
||||
}
|
||||
|
||||
export function useTestnetsContractList(walletAddress: string | undefined) {
|
||||
function useTestnetsContractList(walletAddress: string | undefined) {
|
||||
const goerliQuery = useContractList(
|
||||
Goerli.chainId,
|
||||
getDashboardChainRpc(Goerli),
|
||||
|
||||
+10
-11
@@ -24,20 +24,19 @@ const config: CodegenConfig = {
|
||||
},
|
||||
},
|
||||
],
|
||||
// emitLegacyCommonJSImports: false,
|
||||
// this is annoying, would be better if all of our code was in src/
|
||||
documents: ["./graphql/**/*.graphql"],
|
||||
generates: {
|
||||
"./graphql/generated_types.ts": {
|
||||
plugins: ["typescript"],
|
||||
},
|
||||
"./graphql/__generated__/": {
|
||||
preset: "near-operation-file",
|
||||
plugins: ["typescript-operations", "typescript-react-apollo"],
|
||||
presetConfig: {
|
||||
gqlTagName: "gql",
|
||||
baseTypesPath: "../generated_types.ts",
|
||||
extension: ".generated.ts",
|
||||
folder: "../__generated__",
|
||||
"./graphql/generated.ts": {
|
||||
plugins: [
|
||||
"typescript",
|
||||
"typescript-operations",
|
||||
"typescript-react-apollo",
|
||||
],
|
||||
config: {
|
||||
useTypeImports: true,
|
||||
withComponent: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -8,7 +8,7 @@ import { SlideStateProps, TRACK_CATEGORY } from "./shared";
|
||||
import React from "react";
|
||||
import { Text, TrackedLink } from "tw-components";
|
||||
|
||||
export interface Slide {
|
||||
interface Slide {
|
||||
title: React.ReactNode;
|
||||
background: string;
|
||||
graphic: React.FC<SlideStateProps>;
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
import type { ChartErrorStateProps } from "./chart-container";
|
||||
import { CustomToolTip } from "./custom-tooltip";
|
||||
import {
|
||||
Alert,
|
||||
AlertIcon,
|
||||
AlertTitle,
|
||||
Box,
|
||||
BoxProps,
|
||||
Center,
|
||||
Flex,
|
||||
} from "@chakra-ui/react";
|
||||
import { Box, BoxProps, Center } from "@chakra-ui/react";
|
||||
import { useEffect, useId, useState } from "react";
|
||||
import {
|
||||
Area,
|
||||
@@ -18,7 +9,7 @@ import {
|
||||
XAxis,
|
||||
YAxis,
|
||||
} from "recharts";
|
||||
import { Button, Heading, Text } from "tw-components";
|
||||
import { Text } from "tw-components";
|
||||
|
||||
export type GenericDataType = Record<string, string | number>;
|
||||
|
||||
@@ -47,7 +38,7 @@ export interface AreaChartProps<
|
||||
startEndOnly?: boolean;
|
||||
}
|
||||
|
||||
export const AreaChart = <
|
||||
const AreaChart = <
|
||||
TData extends GenericDataType,
|
||||
TIndexKey extends keyof TData,
|
||||
>({
|
||||
@@ -247,47 +238,3 @@ export const AreaChartLoadingState: React.FC = () => {
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export const AreaChartErrorState: React.FC<
|
||||
Pick<ChartErrorStateProps, "resetError">
|
||||
> = ({ resetError }) => {
|
||||
const [fakeData] = useState(generateFakeData());
|
||||
|
||||
return (
|
||||
<Box position="relative">
|
||||
<Center
|
||||
backdropFilter="blur(4px)"
|
||||
zIndex={1}
|
||||
position="absolute"
|
||||
top={0}
|
||||
left={0}
|
||||
right={0}
|
||||
bottom={0}
|
||||
>
|
||||
<Alert
|
||||
w="auto"
|
||||
status="error"
|
||||
borderRadius="xl"
|
||||
maxW="md"
|
||||
alignItems="flex-start"
|
||||
>
|
||||
<AlertIcon />
|
||||
<Flex direction="column" gap={2}>
|
||||
<Heading as={AlertTitle} size="title.xs">
|
||||
Chart Error
|
||||
</Heading>
|
||||
<Button onClick={resetError} colorScheme="red" size="xs">
|
||||
Reload
|
||||
</Button>
|
||||
</Flex>
|
||||
</Alert>
|
||||
</Center>
|
||||
<AreaChart
|
||||
pointerEvents="none"
|
||||
data={fakeData}
|
||||
index={{ id: "key" }}
|
||||
categories={[{ id: "value", color: "var(--chakra-colors-red-500)" }]}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ type GenericDataType = Record<string, string | number>;
|
||||
|
||||
type IndexType = "date";
|
||||
|
||||
export interface AutoBarChartProps<
|
||||
interface AutoBarChartProps<
|
||||
TData extends GenericDataType,
|
||||
TIndexKey extends keyof TData,
|
||||
> extends BoxProps {
|
||||
|
||||
@@ -14,7 +14,7 @@ type GenericDataType = Record<string, string | number>;
|
||||
|
||||
type IndexType = "date";
|
||||
|
||||
export interface BarChartProps<
|
||||
interface BarChartProps<
|
||||
TData extends GenericDataType,
|
||||
TIndexKey extends keyof TData,
|
||||
> extends BoxProps {
|
||||
|
||||
@@ -3,9 +3,9 @@ import { AspectRatio, AspectRatioProps, Flex } from "@chakra-ui/react";
|
||||
import { Suspense } from "react";
|
||||
import { ComponentWithChildren } from "types/component-with-children";
|
||||
|
||||
export type SupportedChartType = "area";
|
||||
type SupportedChartType = "area";
|
||||
|
||||
export interface ChartContainerProps extends AspectRatioProps {
|
||||
interface ChartContainerProps extends AspectRatioProps {
|
||||
chartTitle?: JSX.Element;
|
||||
chartType?: SupportedChartType;
|
||||
}
|
||||
@@ -37,18 +37,3 @@ const ChartLoadingState: React.FC<Pick<ChartContainerProps, "chartType">> = ({
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
export interface ChartErrorStateProps
|
||||
extends Pick<ChartContainerProps, "chartType"> {
|
||||
resetError: () => void;
|
||||
}
|
||||
|
||||
// const ChartErrorState: React.FC<ChartErrorStateProps> = ({
|
||||
// chartType,
|
||||
// resetError,
|
||||
// }) => {
|
||||
// if (chartType === "area") {
|
||||
// return <AreaChartErrorState resetError={resetError} />;
|
||||
// }
|
||||
// return null;
|
||||
// };
|
||||
|
||||
@@ -103,9 +103,7 @@ const persister: Persister = createAsyncStoragePersister({
|
||||
key: `tw-query-cache`,
|
||||
});
|
||||
|
||||
export interface AppLayoutProps
|
||||
extends AppShellProps,
|
||||
DashboardThirdwebProviderProps {
|
||||
interface AppLayoutProps extends AppShellProps, DashboardThirdwebProviderProps {
|
||||
dehydratedState?: DehydratedState;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ const personalWallets = [
|
||||
oneKeyWallet(),
|
||||
];
|
||||
|
||||
export const dashboardSupportedWallets = [
|
||||
const dashboardSupportedWallets = [
|
||||
...personalWallets,
|
||||
safeWallet({
|
||||
personalWallets,
|
||||
|
||||
@@ -1,56 +1,9 @@
|
||||
import { Flex } from "@chakra-ui/react";
|
||||
import { ChakraNextImage } from "components/Image";
|
||||
import { Text } from "tw-components";
|
||||
|
||||
interface GradientMapping {
|
||||
[key: string]: string;
|
||||
}
|
||||
|
||||
type PrizeProps = {
|
||||
prize: {
|
||||
id: number;
|
||||
name: string;
|
||||
rarity: string;
|
||||
src: string;
|
||||
multiple: boolean;
|
||||
alt: string;
|
||||
};
|
||||
};
|
||||
|
||||
export const gradientMapping: GradientMapping = {
|
||||
legendary: "linear(to-r, #B74AA4, #E173C7)",
|
||||
rare: "linear(to-r, #4830A4, #9786DF)",
|
||||
common: "linear(to-r, #743F9E, #BFA3DA)",
|
||||
};
|
||||
|
||||
export const Prize: React.FC<PrizeProps> = ({
|
||||
prize: { name, src, multiple, alt, rarity },
|
||||
}) => {
|
||||
return (
|
||||
<Flex direction="column" alignItems="center" maxW="325px" rounded="lg">
|
||||
<Flex
|
||||
direction="column"
|
||||
alignItems="center"
|
||||
gap={4}
|
||||
p={4}
|
||||
w="full"
|
||||
h="full"
|
||||
roundedBottom="xl"
|
||||
>
|
||||
<Text textAlign="center" fontSize="32px" fontWeight="bold">
|
||||
{name}
|
||||
</Text>
|
||||
<Text
|
||||
textTransform="uppercase"
|
||||
bgGradient={gradientMapping[rarity] || gradientMapping.rare}
|
||||
bgClip="text"
|
||||
fontSize="14px"
|
||||
fontWeight="bold"
|
||||
>
|
||||
{rarity} {multiple ? "prizes" : "prize"}
|
||||
</Text>
|
||||
</Flex>
|
||||
<ChakraNextImage src={src} alt={alt} px={12} mt={6} />
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -2,12 +2,8 @@ import { useContract } from "@thirdweb-dev/react";
|
||||
import { FeatureName } from "@thirdweb-dev/sdk/dist/declarations/src/evm/constants/contract-features";
|
||||
import { ContractWrapper } from "@thirdweb-dev/sdk/dist/declarations/src/evm/core/classes/internal/contract-wrapper";
|
||||
import { detectContractFeature } from "@thirdweb-dev/sdk";
|
||||
import { ButtonProps } from "tw-components";
|
||||
|
||||
export interface FeatureDetectButtonProps
|
||||
extends ButtonProps,
|
||||
ExtensionDetectedStateParams {}
|
||||
export interface ExtensionDetectedStateParams {
|
||||
interface ExtensionDetectedStateParams {
|
||||
/**
|
||||
* The feature or features to check
|
||||
*/
|
||||
|
||||
@@ -27,8 +27,7 @@ import { BiTransferAlt } from "react-icons/bi";
|
||||
import { FiInfo } from "react-icons/fi";
|
||||
import { Button, Card, Heading, LinkButton, Text } from "tw-components";
|
||||
|
||||
export interface TransactionButtonProps
|
||||
extends Omit<ConnectWalletProps, "leftIcon"> {
|
||||
interface TransactionButtonProps extends Omit<ConnectWalletProps, "leftIcon"> {
|
||||
transactionCount: number;
|
||||
isLoading: boolean;
|
||||
isGasless?: boolean;
|
||||
@@ -37,7 +36,7 @@ export interface TransactionButtonProps
|
||||
}
|
||||
|
||||
// this is in react-package as well
|
||||
export function useWalletRequiresConfirmation() {
|
||||
function useWalletRequiresConfirmation() {
|
||||
const activeWallet = useWallet();
|
||||
const installedWallets = useInstalledWallets();
|
||||
|
||||
@@ -213,7 +212,7 @@ interface ExternalApprovalNoticeProps {
|
||||
initialFocusRef: React.RefObject<HTMLButtonElement>;
|
||||
}
|
||||
|
||||
export const ExternalApprovalNotice: React.FC<ExternalApprovalNoticeProps> = ({
|
||||
const ExternalApprovalNotice: React.FC<ExternalApprovalNoticeProps> = ({
|
||||
walletId,
|
||||
initialFocusRef,
|
||||
}) => {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import { StoredChain } from "contexts/configured-chains";
|
||||
import { useSetEditChain } from "hooks/networkConfigModal";
|
||||
|
||||
export interface AddNetworkModalProps {
|
||||
interface AddNetworkModalProps {
|
||||
onClose: () => void;
|
||||
onNetworkAdded?: (chain: StoredChain) => void;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ const HEADLESS_WALLET_IDS: string[] = [
|
||||
walletIds.paper,
|
||||
] as string[];
|
||||
|
||||
export interface ContractPublishMetadata {
|
||||
interface ContractPublishMetadata {
|
||||
image: string | StaticImageData;
|
||||
name: string;
|
||||
description?: string;
|
||||
@@ -430,7 +430,7 @@ export function useFunctionParamsFromABI(abi?: any, functionName?: string) {
|
||||
}, [abi, functionName]);
|
||||
}
|
||||
|
||||
export function toContractIdIpfsHash(contractId: ContractId) {
|
||||
function toContractIdIpfsHash(contractId: ContractId) {
|
||||
if (contractId?.startsWith("ipfs://")) {
|
||||
return contractId;
|
||||
}
|
||||
@@ -800,7 +800,7 @@ export function usePublishedContractsQuery(address?: string) {
|
||||
|
||||
const ALWAYS_SUGGESTED = ["ContractMetadata", "Permissions"];
|
||||
|
||||
export function extractExtensions(
|
||||
function extractExtensions(
|
||||
input: ReturnType<typeof detectFeatures>,
|
||||
enabledExtensions: FeatureWithEnabled[] = [],
|
||||
suggestedExtensions: FeatureWithEnabled[] = [],
|
||||
@@ -840,7 +840,7 @@ export function extractExtensions(
|
||||
};
|
||||
}
|
||||
|
||||
export function useContractDetectedExtensions(abi?: any) {
|
||||
function useContractDetectedExtensions(abi?: any) {
|
||||
const features = useMemo(() => {
|
||||
if (abi) {
|
||||
return extractExtensions(detectFeatures(abi));
|
||||
@@ -905,10 +905,6 @@ export function useEns(addressOrEnsName?: string) {
|
||||
return useQuery(ensQuery(addressOrEnsName));
|
||||
}
|
||||
|
||||
export function fetchEns(queryClient: QueryClient, addressOrEnsName: string) {
|
||||
return queryClient.fetchQuery(ensQuery(addressOrEnsName));
|
||||
}
|
||||
|
||||
export function useContractFunctions(abi: Abi) {
|
||||
return abi ? extractFunctionsFromAbi(abi) : undefined;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ import {
|
||||
} from "tw-components";
|
||||
import { shortenIfAddress } from "utils/usedapp-external";
|
||||
|
||||
export interface ExtendedPublishedContract extends PublishedContractType {
|
||||
interface ExtendedPublishedContract extends PublishedContractType {
|
||||
name: string;
|
||||
displayName?: string;
|
||||
description: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useEns, usePublisherProfile } from "../hooks";
|
||||
import { MaskedAvatar, MaskedAvatarProps } from "tw-components/masked-avatar";
|
||||
|
||||
export interface PublisherAvatarProps extends Omit<MaskedAvatarProps, "src"> {
|
||||
interface PublisherAvatarProps extends Omit<MaskedAvatarProps, "src"> {
|
||||
address: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
import { Icon, forwardRef } from "@chakra-ui/react";
|
||||
import { useTrack } from "hooks/analytics/useTrack";
|
||||
import { useSetIsNetworkConfigModalOpen } from "hooks/networkConfigModal";
|
||||
import { IoMdSettings } from "react-icons/io";
|
||||
import { Button, ButtonProps } from "tw-components";
|
||||
|
||||
interface ConfigureNetworkButtonProps extends ButtonProps {
|
||||
label: string;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export const ConfigureNetworkButton = forwardRef<
|
||||
ConfigureNetworkButtonProps,
|
||||
"button"
|
||||
>(({ label, children = "Configure Networks", ...restButtonProps }, ref) => {
|
||||
const trackEvent = useTrack();
|
||||
const setIsNetworkModalOpen = useSetIsNetworkConfigModalOpen();
|
||||
|
||||
const handleClick = () => {
|
||||
trackEvent({
|
||||
category: "configure-networks",
|
||||
action: "click",
|
||||
label,
|
||||
});
|
||||
setIsNetworkModalOpen(true);
|
||||
};
|
||||
|
||||
return (
|
||||
<Button
|
||||
ref={ref}
|
||||
variant="filled"
|
||||
background="inputBg"
|
||||
_hover={{
|
||||
background: "inputBgHover",
|
||||
}}
|
||||
leftIcon={<Icon color="inherit" as={IoMdSettings} />}
|
||||
onClick={handleClick}
|
||||
py={3}
|
||||
{...restButtonProps}
|
||||
>
|
||||
{children}
|
||||
</Button>
|
||||
);
|
||||
});
|
||||
@@ -9,7 +9,7 @@ import { ChakraNextImage, ChakraNextImageProps } from "components/Image";
|
||||
import { replaceIpfsUrl } from "lib/sdk";
|
||||
import { StaticImageData } from "next/image";
|
||||
|
||||
export interface ContractIdImageProps
|
||||
interface ContractIdImageProps
|
||||
extends Omit<ChakraNextImageProps, "src" | "alt" | "boxSize"> {
|
||||
contractId: ContractId;
|
||||
boxSize?: number;
|
||||
|
||||
@@ -322,7 +322,7 @@ interface ContractTableProps {
|
||||
chainIdsWithDeployments: number[];
|
||||
}
|
||||
|
||||
export const ContractTable: ComponentWithChildren<ContractTableProps> = ({
|
||||
const ContractTable: ComponentWithChildren<ContractTableProps> = ({
|
||||
combinedList,
|
||||
children,
|
||||
isFetching,
|
||||
|
||||
@@ -38,7 +38,7 @@ interface ContractFunctionProps {
|
||||
contract?: SmartContract;
|
||||
}
|
||||
|
||||
export const ContractFunction: React.FC<ContractFunctionProps> = ({
|
||||
const ContractFunction: React.FC<ContractFunctionProps> = ({
|
||||
fn,
|
||||
contract,
|
||||
}) => {
|
||||
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
TrackedLink,
|
||||
} from "tw-components";
|
||||
|
||||
export function formatResponseData(data: unknown): string {
|
||||
function formatResponseData(data: unknown): string {
|
||||
if (BigNumber.isBigNumber(data)) {
|
||||
data = data.toString();
|
||||
}
|
||||
@@ -51,7 +51,7 @@ export function formatResponseData(data: unknown): string {
|
||||
return JSON.stringify(data, null, 2);
|
||||
}
|
||||
|
||||
export function formatError(error: Error): string {
|
||||
function formatError(error: Error): string {
|
||||
if ((error as any).reason) {
|
||||
return (error as any).reason;
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import { ValidContractInstance } from "@thirdweb-dev/sdk";
|
||||
|
||||
export interface IMintFormProps {
|
||||
contract?: ValidContractInstance;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import type {
|
||||
AuctionListing,
|
||||
DirectListing,
|
||||
Marketplace,
|
||||
ValidContractInstance,
|
||||
} from "@thirdweb-dev/sdk";
|
||||
|
||||
type ListingMetadata = AuctionListing | DirectListing;
|
||||
|
||||
export type TTableType<TContract extends ValidContractInstance> =
|
||||
TContract extends Marketplace ? ListingMetadata : never;
|
||||
@@ -1,19 +0,0 @@
|
||||
import { useLoggedInUser } from "@3rdweb-sdk/react/hooks/useLoggedInUser";
|
||||
import { ConnectWalletPrompt } from "components/settings/ConnectWalletPrompt";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
interface LoggedInOnlyViewProps {
|
||||
children: ReactNode;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export const LoggedInOnlyView: React.FC<LoggedInOnlyViewProps> = ({
|
||||
children,
|
||||
description,
|
||||
}) => {
|
||||
const { isLoggedIn } = useLoggedInUser();
|
||||
if (!isLoggedIn) {
|
||||
return <ConnectWalletPrompt description={description} />;
|
||||
}
|
||||
return <>{children}</>;
|
||||
};
|
||||
@@ -201,7 +201,7 @@ export const ContractCard: React.FC<ContractCardProps> = ({
|
||||
};
|
||||
|
||||
// data fetching
|
||||
export type PublishedContractId =
|
||||
type PublishedContractId =
|
||||
| `${string}/${string}`
|
||||
| `${string}/${string}/${string}`;
|
||||
|
||||
@@ -274,11 +274,9 @@ export function publishedContractQuery(
|
||||
};
|
||||
}
|
||||
|
||||
export type PublishedContract = Awaited<
|
||||
ReturnType<typeof publishedContractQueryFn>
|
||||
>;
|
||||
type PublishedContract = Awaited<ReturnType<typeof publishedContractQueryFn>>;
|
||||
|
||||
export function usePublishedContract(publishedContractId: PublishedContractId) {
|
||||
function usePublishedContract(publishedContractId: PublishedContractId) {
|
||||
const queryClient = useQueryClient();
|
||||
return useQuery(publishedContractQuery(publishedContractId, queryClient));
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import { Container } from "@chakra-ui/react";
|
||||
import { Stat } from "components/homepage/sections/StatsSection";
|
||||
import React from "react";
|
||||
import { Heading } from "tw-components";
|
||||
|
||||
export const PrizeSection: React.FC = () => {
|
||||
return (
|
||||
<Container maxW={"container.page"} mt={28}>
|
||||
<Heading as="h1" size="title.2xl" mb={6} textAlign="center">
|
||||
Grand Prize
|
||||
</Heading>
|
||||
<Stat title="$10,000" description="in thirdweb credits" />
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
@@ -38,7 +38,7 @@ export function ContextAIBotButton() {
|
||||
);
|
||||
}
|
||||
|
||||
export function ContextAIBotScript() {
|
||||
function ContextAIBotScript() {
|
||||
return (
|
||||
<Script
|
||||
// defer
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
.cursor {
|
||||
animation: blink 800ms ease infinite;
|
||||
height: 1em;
|
||||
width: 1px;
|
||||
display: inline-block;
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
50% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
@@ -1,73 +1,8 @@
|
||||
import styles from "./AnimatedCLICommand.module.css";
|
||||
import { Box, Flex, Icon, IconButton, useClipboard } from "@chakra-ui/react";
|
||||
import { Icon, IconButton, useClipboard } from "@chakra-ui/react";
|
||||
import { IoMdCheckmark } from "@react-icons/all-files/io/IoMdCheckmark";
|
||||
import { useTrack } from "hooks/analytics/useTrack";
|
||||
import { useEffect, useRef } from "react";
|
||||
|
||||
import { FiCopy } from "react-icons/fi";
|
||||
import { Text } from "tw-components";
|
||||
|
||||
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
/**
|
||||
* types given texts one after another - one character at a time - indefinitely
|
||||
*/
|
||||
function useCycledTyping(texts: string[]) {
|
||||
const spanRef = useRef<HTMLSpanElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
let isMounted = true;
|
||||
const span = spanRef.current;
|
||||
|
||||
// type the given text
|
||||
async function type(text: string) {
|
||||
if (!span) {
|
||||
return;
|
||||
}
|
||||
|
||||
// type the text one character at a time
|
||||
let i = 0;
|
||||
while (i < text.length) {
|
||||
span.textContent = text.slice(0, i + 1);
|
||||
await sleep(100);
|
||||
i++;
|
||||
}
|
||||
|
||||
// keep the typed text on screen for a while
|
||||
await sleep(2000);
|
||||
|
||||
// erase the typed text one character at a time - but faster
|
||||
while (i >= 0) {
|
||||
span.textContent = text.slice(0, i);
|
||||
i--;
|
||||
await sleep(40);
|
||||
}
|
||||
}
|
||||
|
||||
async function startTyping() {
|
||||
if (!span) {
|
||||
return;
|
||||
}
|
||||
|
||||
// cycle through the texts
|
||||
let i = 0;
|
||||
while (isMounted) {
|
||||
await type(texts[i % texts.length]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
startTyping();
|
||||
|
||||
return () => {
|
||||
isMounted = false;
|
||||
if (span) {
|
||||
span.textContent = "";
|
||||
}
|
||||
};
|
||||
}, [texts]);
|
||||
|
||||
return spanRef;
|
||||
}
|
||||
|
||||
export const CopyButton: React.FC<{ text: string }> = ({ text }) => {
|
||||
const { onCopy, hasCopied } = useClipboard(text);
|
||||
@@ -97,35 +32,3 @@ export const CopyButton: React.FC<{ text: string }> = ({ text }) => {
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const AnimatedCLICommand: React.FC = () => {
|
||||
const spanRef = useCycledTyping(["create", "deploy", "publish"]);
|
||||
|
||||
return (
|
||||
<Flex
|
||||
background="rgba(255, 255, 255, 0.08)"
|
||||
border="1px solid rgba(255, 255, 255, 0.2)"
|
||||
borderRadius="md"
|
||||
flexShrink={0}
|
||||
py={3}
|
||||
px={4}
|
||||
minW={"300px"}
|
||||
gap={1}
|
||||
align="center"
|
||||
alignSelf="start"
|
||||
>
|
||||
<Text
|
||||
color="white"
|
||||
fontFamily="mono"
|
||||
fontSize="16px"
|
||||
fontWeight="500"
|
||||
whiteSpace="nowrap"
|
||||
>
|
||||
<span>$ npx thirdweb </span>
|
||||
<span ref={spanRef}></span>
|
||||
</Text>
|
||||
<Box className={styles.cursor}></Box>
|
||||
<CopyButton text="npx thirdweb" />
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ const lightThemeDefault = themes.vsLight;
|
||||
|
||||
type PrismTheme = typeof darkThemeDefault;
|
||||
|
||||
export interface CodeBlockProps extends Omit<CodeProps, "size"> {
|
||||
interface CodeBlockProps extends Omit<CodeProps, "size"> {
|
||||
code: string;
|
||||
language: string;
|
||||
canCopy?: boolean;
|
||||
|
||||
@@ -6,7 +6,7 @@ interface StatBoxProps {
|
||||
description: string;
|
||||
}
|
||||
|
||||
export const Stat: React.FC<StatBoxProps> = ({ title, description }) => {
|
||||
const Stat: React.FC<StatBoxProps> = ({ title, description }) => {
|
||||
return (
|
||||
<Flex
|
||||
justifyContent="center"
|
||||
|
||||
@@ -1,343 +0,0 @@
|
||||
import { GradientText } from "./GradientText";
|
||||
import { KeyFeatureLayout } from "./KeyFeatureLayout";
|
||||
import {
|
||||
Box,
|
||||
Flex,
|
||||
GridItem,
|
||||
LinkBox,
|
||||
LinkOverlay,
|
||||
SimpleGrid,
|
||||
} from "@chakra-ui/react";
|
||||
import { ChakraNextImage as Image } from "components/Image";
|
||||
import { Aurora } from "components/homepage/Aurora";
|
||||
import { Heading, Text } from "tw-components";
|
||||
|
||||
const TRACKING_CATEGORY = "build_section";
|
||||
|
||||
export const BuildSection: React.FC = () => {
|
||||
return (
|
||||
<KeyFeatureLayout
|
||||
title="Build"
|
||||
titleGradient="linear-gradient(70deg, #805AA8, #BAA2D4)"
|
||||
headline="Contracts, apps and games."
|
||||
description=""
|
||||
>
|
||||
<SimpleGrid columns={{ md: 9 }} gap={6}>
|
||||
<LinkBox
|
||||
as={GridItem}
|
||||
colSpan={{ md: 4 }}
|
||||
bg="#070707"
|
||||
rounded="lg"
|
||||
overflow="hidden"
|
||||
position="relative"
|
||||
>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "80%", left: "0%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "0%", left: "10%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "50%", left: "90%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<Flex
|
||||
position="relative"
|
||||
w="full"
|
||||
h="full"
|
||||
flexDir="column"
|
||||
align="center"
|
||||
justify="space-between"
|
||||
>
|
||||
<Heading
|
||||
as="h4"
|
||||
size="label.xl"
|
||||
fontSize="22"
|
||||
lineHeight="1.2"
|
||||
py={12}
|
||||
px={14}
|
||||
>
|
||||
Create your own contracts with our{" "}
|
||||
<GradientText
|
||||
as={LinkOverlay}
|
||||
href="/build"
|
||||
category={TRACKING_CATEGORY}
|
||||
label="contractkit"
|
||||
stopOne="#805AA8"
|
||||
stopTwo="#BAA2D4"
|
||||
>
|
||||
Solidity SDK
|
||||
</GradientText>
|
||||
</Heading>
|
||||
<Image
|
||||
pointerEvents="none"
|
||||
pl={14}
|
||||
w="full"
|
||||
mt="auto"
|
||||
src={require("/public/assets/landingpage/build-solidity-sdk.png")}
|
||||
alt=""
|
||||
/>
|
||||
</Flex>
|
||||
</LinkBox>
|
||||
<LinkBox
|
||||
as={GridItem}
|
||||
colSpan={{ md: 5 }}
|
||||
bg="#070707"
|
||||
rounded="lg"
|
||||
overflow="hidden"
|
||||
position="relative"
|
||||
>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "20%", left: "100%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "0%", left: "0%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<Flex
|
||||
w="full"
|
||||
h="full"
|
||||
flexDir="column"
|
||||
align="center"
|
||||
justify="space-between"
|
||||
position="relative"
|
||||
>
|
||||
<Heading
|
||||
as="h4"
|
||||
lineHeight="1.2"
|
||||
textAlign="center"
|
||||
size="label.xl"
|
||||
fontSize="22"
|
||||
px={14}
|
||||
py={12}
|
||||
>
|
||||
Discover ready-to-deploy <br />
|
||||
contracts in{" "}
|
||||
<GradientText
|
||||
as={LinkOverlay}
|
||||
href="/explore"
|
||||
category={TRACKING_CATEGORY}
|
||||
label="explore"
|
||||
stopOne="#805AA8"
|
||||
stopTwo="#BAA2D4"
|
||||
>
|
||||
Explore
|
||||
</GradientText>
|
||||
</Heading>
|
||||
<Image
|
||||
pointerEvents="none"
|
||||
w="full"
|
||||
src={require("/public/assets/landingpage/build-explore.png")}
|
||||
alt=""
|
||||
/>
|
||||
</Flex>
|
||||
</LinkBox>
|
||||
<GridItem
|
||||
as={SimpleGrid}
|
||||
columns={{ md: 2 }}
|
||||
colSpan={{ md: 9 }}
|
||||
bg="#070707"
|
||||
rounded="lg"
|
||||
overflow="hidden"
|
||||
position="relative"
|
||||
>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "70%", left: "100%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "30%", left: "50%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "40%", left: "0%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<Flex
|
||||
position="relative"
|
||||
h="full"
|
||||
flexDir="column"
|
||||
justify="center"
|
||||
px={14}
|
||||
py={12}
|
||||
w="full"
|
||||
gap={6}
|
||||
>
|
||||
<Heading
|
||||
lineHeight="1.2"
|
||||
size="label.xl"
|
||||
fontSize="22"
|
||||
textAlign={{ base: "center", md: "left" }}
|
||||
as="h4"
|
||||
>
|
||||
<GradientText
|
||||
category={TRACKING_CATEGORY}
|
||||
label="infrastructure"
|
||||
stopOne="#805AA8"
|
||||
stopTwo="#BAA2D4"
|
||||
>
|
||||
Fully managed infrastructure services
|
||||
</GradientText>{" "}
|
||||
in a single toolkit to enable developers to build for scale
|
||||
</Heading>
|
||||
</Flex>
|
||||
<Box px={14} py={10} position="relative">
|
||||
<Image
|
||||
h="full"
|
||||
maxH={150}
|
||||
src={require("/public/assets/landingpage/build-infrastructure.png")}
|
||||
alt=""
|
||||
/>
|
||||
</Box>
|
||||
</GridItem>
|
||||
<LinkBox
|
||||
as={GridItem}
|
||||
colSpan={{ md: 6 }}
|
||||
bg="#070707"
|
||||
rounded="lg"
|
||||
position="relative"
|
||||
overflow="hidden"
|
||||
>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "50%", left: "70%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "50%", left: "0%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<SimpleGrid
|
||||
columns={{ md: 2 }}
|
||||
px={14}
|
||||
gap={{ md: 14 }}
|
||||
h="full"
|
||||
position="relative"
|
||||
>
|
||||
<Flex
|
||||
as={GridItem}
|
||||
flexDir="column"
|
||||
justify="center"
|
||||
py={12}
|
||||
w="full"
|
||||
gap={6}
|
||||
_hover={{ textDecoration: "none" }}
|
||||
>
|
||||
<Heading
|
||||
lineHeight="1.2"
|
||||
size="label.xl"
|
||||
fontSize="22"
|
||||
textAlign={{ base: "center", md: "left" }}
|
||||
as="h4"
|
||||
>
|
||||
Integrate web3 technologies into your apps and games with our{" "}
|
||||
<GradientText
|
||||
as={LinkOverlay}
|
||||
href="/sdk"
|
||||
category={TRACKING_CATEGORY}
|
||||
label="sdk"
|
||||
stopOne="#805AA8"
|
||||
stopTwo="#BAA2D4"
|
||||
>
|
||||
easy-to-use SDKs
|
||||
</GradientText>
|
||||
</Heading>
|
||||
<Text
|
||||
color="whiteAlpha.700"
|
||||
textAlign={{ base: "center", md: "left" }}
|
||||
>
|
||||
JavaScript. React. React Native. Python. Go. Unity. C#.
|
||||
<br />
|
||||
Platform support includes native, mobile, console, browser, and
|
||||
VR.
|
||||
</Text>
|
||||
</Flex>
|
||||
<Flex align="center" justify="center" py={6}>
|
||||
<Image
|
||||
pointerEvents="none"
|
||||
h="full"
|
||||
maxH={200}
|
||||
src={require("/public/assets/landingpage/build-sdk.png")}
|
||||
alt=""
|
||||
/>
|
||||
</Flex>
|
||||
</SimpleGrid>
|
||||
</LinkBox>
|
||||
<LinkBox
|
||||
as={GridItem}
|
||||
colSpan={{ md: 3 }}
|
||||
bg="#070707"
|
||||
rounded="lg"
|
||||
position="relative"
|
||||
overflow="hidden"
|
||||
>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "40%", left: "0%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "60%", left: "80%" }}
|
||||
color="#4F135860"
|
||||
/>
|
||||
<Flex position="relative" flexDir="column">
|
||||
<Heading
|
||||
as="h4"
|
||||
size="label.xl"
|
||||
fontSize="22"
|
||||
lineHeight="1.2"
|
||||
pt={6}
|
||||
pb={8}
|
||||
px={10}
|
||||
>
|
||||
Plug-and-play frontend{" "}
|
||||
<GradientText
|
||||
as={LinkOverlay}
|
||||
href="/ui-components"
|
||||
category={TRACKING_CATEGORY}
|
||||
label="ui_components"
|
||||
stopOne="#805AA8"
|
||||
stopTwo="#BAA2D4"
|
||||
>
|
||||
web3 components
|
||||
</GradientText>
|
||||
</Heading>
|
||||
<Image
|
||||
pointerEvents="none"
|
||||
pl={10}
|
||||
pb={10}
|
||||
w="full"
|
||||
src={require("/public/assets/landingpage/build-ui_components.png")}
|
||||
alt=""
|
||||
/>
|
||||
</Flex>
|
||||
</LinkBox>
|
||||
</SimpleGrid>
|
||||
</KeyFeatureLayout>
|
||||
);
|
||||
};
|
||||
@@ -1,39 +0,0 @@
|
||||
import { Box } from "@chakra-ui/react";
|
||||
import { TrackedLink, TrackedLinkProps } from "tw-components";
|
||||
import { ComponentWithChildren } from "types/component-with-children";
|
||||
|
||||
interface GradientTextProps extends Omit<TrackedLinkProps, "href"> {
|
||||
stopOne: string;
|
||||
stopTwo: string;
|
||||
href?: string;
|
||||
}
|
||||
|
||||
export const GradientText: ComponentWithChildren<GradientTextProps> = ({
|
||||
children,
|
||||
stopOne,
|
||||
stopTwo,
|
||||
href,
|
||||
...restProps
|
||||
}) => {
|
||||
const props = {
|
||||
bgGradient: `linear-gradient(70deg, ${stopOne}, ${stopTwo} , ${stopOne})`,
|
||||
bgClip: "text",
|
||||
bgSize: "200%",
|
||||
};
|
||||
|
||||
return href ? (
|
||||
<TrackedLink
|
||||
{...restProps}
|
||||
href={href}
|
||||
transition="background 0.5s ease"
|
||||
_hover={{ bgPos: "100%" }}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</TrackedLink>
|
||||
) : (
|
||||
<Box as="span" {...props}>
|
||||
{children}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
@@ -1,315 +0,0 @@
|
||||
import { KeyFeatureLayout } from "./KeyFeatureLayout";
|
||||
import { Box, Flex, GridItem, SimpleGrid } from "@chakra-ui/react";
|
||||
import { ChakraNextImage as Image } from "components/Image";
|
||||
import React from "react";
|
||||
import { Heading, TrackedLink } from "tw-components";
|
||||
|
||||
const TRACKING_CATEGORY = "how_it_works_section";
|
||||
|
||||
const data: { title: string; icons: Item[] }[] = [
|
||||
{
|
||||
title: "CONTRACTS",
|
||||
icons: [
|
||||
{
|
||||
icon: require("/public/assets/product-icons/extensions.png"),
|
||||
title: "Build",
|
||||
href: "/build",
|
||||
},
|
||||
{
|
||||
icon: require("/public/assets/product-icons/deploy.png"),
|
||||
title: "Deploy",
|
||||
href: "/deploy",
|
||||
},
|
||||
{
|
||||
icon: require("/public/assets/product-icons/interact.png"),
|
||||
title: "Interact",
|
||||
href: "/interact",
|
||||
},
|
||||
{
|
||||
icon: require("/public/assets/product-icons/contracts.png"),
|
||||
title: "Explore",
|
||||
href: "/explore",
|
||||
},
|
||||
{
|
||||
icon: require("/public/assets/product-icons/publish.png"),
|
||||
title: "Publish",
|
||||
href: "/publish",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "WALLET",
|
||||
icons: [
|
||||
{
|
||||
icon: require("/public/assets/product-icons/wallet-sdk.png"),
|
||||
title: "Connect",
|
||||
href: "/connect",
|
||||
},
|
||||
{
|
||||
icon: require("/public/assets/product-icons/smart-wallet.png"),
|
||||
title: "Smart Wallet",
|
||||
href: "/account-abstraction",
|
||||
},
|
||||
{
|
||||
icon: require("/public/assets/product-icons/embedded-wallet.png"),
|
||||
title: "Embedded Wallets",
|
||||
href: "/embedded-wallets",
|
||||
},
|
||||
{
|
||||
icon: require("/public/assets/product-icons/auth.png"),
|
||||
title: "Auth",
|
||||
href: "/auth",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "PAYMENTS",
|
||||
icons: [
|
||||
{
|
||||
icon: require("/public/assets/product-icons/payments.png"),
|
||||
title: "NFT Checkout",
|
||||
href: "/checkout",
|
||||
},
|
||||
{
|
||||
icon: require("/public/assets/product-icons/sponsored-transactions.png"),
|
||||
title: "Sponsored Transactions",
|
||||
href: "/sponsored-transactions",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "INFRASTRUCTURE",
|
||||
icons: [
|
||||
{
|
||||
icon: require("/public/assets/product-icons/storage.png"),
|
||||
title: "Decentralized Storage",
|
||||
href: "/storage",
|
||||
},
|
||||
{
|
||||
icon: require("/public/assets/product-icons/rpc-edge.png"),
|
||||
title: "RPC Edge",
|
||||
href: "/rpc-edge",
|
||||
},
|
||||
{
|
||||
icon: require("/public/assets/product-icons/engine.png"),
|
||||
title: "Engine",
|
||||
href: "/engine",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
type Item = {
|
||||
icon: any;
|
||||
title: string;
|
||||
href?: string;
|
||||
};
|
||||
const Item: React.FC<{ item: Item }> = ({ item }) => {
|
||||
return item.href ? (
|
||||
<Flex
|
||||
flexDir="column"
|
||||
align="center"
|
||||
gap="2.5"
|
||||
as={TrackedLink}
|
||||
href={item.href}
|
||||
category={TRACKING_CATEGORY}
|
||||
label={item.title.replace(" ", "_").toLowerCase()}
|
||||
transition="opacity 0.2s"
|
||||
_hover={{ opacity: 0.8, textDecoration: "none" }}
|
||||
>
|
||||
<Image w="10" h="10" alt="" src={item.icon} />
|
||||
<Heading
|
||||
size="title.xs"
|
||||
color="#A0A0A0"
|
||||
fontSize="0.7rem"
|
||||
textAlign="center"
|
||||
as="h5"
|
||||
>
|
||||
{item.title}
|
||||
</Heading>
|
||||
</Flex>
|
||||
) : (
|
||||
<Flex flexDir="column" align="center" gap="2.5">
|
||||
<Image w="10" h="10" alt="" src={item.icon} />
|
||||
<Heading
|
||||
size="title.xs"
|
||||
color="#A0A0A0"
|
||||
fontSize="0.7rem"
|
||||
textAlign="center"
|
||||
as="h5"
|
||||
>
|
||||
{item.title}
|
||||
</Heading>
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
||||
export const HowItWorksSection: React.FC = () => {
|
||||
return (
|
||||
<KeyFeatureLayout
|
||||
title="Complete"
|
||||
titleGradient="linear-gradient(70deg, #A3469D, #B799D5)"
|
||||
headline="All-in-one solution."
|
||||
description=""
|
||||
>
|
||||
<Image
|
||||
w="14"
|
||||
h="14"
|
||||
src={require("/public/assets/landingpage/howitworks-logo.png")}
|
||||
alt=""
|
||||
/>
|
||||
<Box w="5px" bg="#0A0A0A" h="7" mt="-1" />
|
||||
<Box w="55%" pt="6" pb="1" border="5px #0A0A0A solid" borderBottom="0" />
|
||||
<Flex
|
||||
align="stretch"
|
||||
justify="space-between"
|
||||
wrap={{ base: "wrap", md: "nowrap" }}
|
||||
gap={4}
|
||||
w="full"
|
||||
>
|
||||
<Flex
|
||||
display={{ base: "none", xl: "flex" }}
|
||||
flexGrow={1}
|
||||
order={{ base: 2, md: 1 }}
|
||||
rounded="8"
|
||||
border="2px #171717 solid"
|
||||
justify="between"
|
||||
flexDir="column"
|
||||
align="center"
|
||||
pb={9}
|
||||
w={{ md: "full" }}
|
||||
maxW={36}
|
||||
maxH="38rem"
|
||||
>
|
||||
<Image
|
||||
opacity={0.55}
|
||||
w="full"
|
||||
src={require("/public/assets/landingpage/howitworks-apps.png")}
|
||||
alt=""
|
||||
mb={2}
|
||||
/>
|
||||
<Heading
|
||||
opacity={0.55}
|
||||
size="title.xs"
|
||||
color="#A0A0A0"
|
||||
fontSize="0.7rem"
|
||||
textAlign="center"
|
||||
mt="auto"
|
||||
as="span"
|
||||
>
|
||||
APPS & GAMES
|
||||
</Heading>
|
||||
</Flex>
|
||||
<Flex
|
||||
flexGrow={1}
|
||||
display={{ base: "none", xl: "flex" }}
|
||||
order={{ base: 3, md: 3 }}
|
||||
rounded="8"
|
||||
border="2px #171717 solid"
|
||||
justify="between"
|
||||
flexDir="column"
|
||||
align="center"
|
||||
pb={12}
|
||||
w={{ md: "full" }}
|
||||
maxW={36}
|
||||
maxH="38rem"
|
||||
>
|
||||
<Image
|
||||
opacity={0.55}
|
||||
w="full"
|
||||
src={require("/public/assets/landingpage/howitworks-networks.png")}
|
||||
alt=""
|
||||
mb={2}
|
||||
/>
|
||||
<Heading
|
||||
opacity={0.55}
|
||||
mt="auto"
|
||||
size="title.xs"
|
||||
color="#A0A0A0"
|
||||
fontSize="0.7rem"
|
||||
textAlign="center"
|
||||
as="span"
|
||||
>
|
||||
DECENTRALIZED NETWORKS
|
||||
</Heading>
|
||||
</Flex>
|
||||
<Flex
|
||||
w={{ base: "full", md: "auto" }}
|
||||
order={{ base: 1, md: 2 }}
|
||||
gap={{ base: 12, md: 8 }}
|
||||
flexGrow={1}
|
||||
flexDir="column"
|
||||
>
|
||||
<HowItWorksSectionItem
|
||||
item={data.find(({ title }) => title === "CONTRACTS")}
|
||||
/>
|
||||
<HowItWorksSectionItem
|
||||
item={data.find(({ title }) => title === "WALLET")}
|
||||
/>
|
||||
<SimpleGrid columns={{ base: 1, md: 2 }} gap={{ base: 12, md: 8 }}>
|
||||
<HowItWorksSectionItem
|
||||
item={data.find(({ title }) => title === "PAYMENTS")}
|
||||
/>
|
||||
<HowItWorksSectionItem
|
||||
item={data.find(({ title }) => title === "INFRASTRUCTURE")}
|
||||
/>
|
||||
</SimpleGrid>
|
||||
</Flex>
|
||||
</Flex>
|
||||
</KeyFeatureLayout>
|
||||
);
|
||||
};
|
||||
|
||||
interface HowItWorksSectionItemProps {
|
||||
item?: {
|
||||
title: string;
|
||||
icons: Item[];
|
||||
};
|
||||
}
|
||||
|
||||
const HowItWorksSectionItem: React.FC<HowItWorksSectionItemProps> = ({
|
||||
item,
|
||||
}) => {
|
||||
return (
|
||||
<Box>
|
||||
<Heading
|
||||
size="title.xs"
|
||||
color="#A0A0A0"
|
||||
textAlign="center"
|
||||
fontSize="0.7rem"
|
||||
letterSpacing={1.1}
|
||||
lineHeight="1"
|
||||
mt="-0.95rem"
|
||||
pb={2}
|
||||
as="h4"
|
||||
>
|
||||
{item?.title}
|
||||
</Heading>
|
||||
<Flex rounded="8" border="2px #171717 solid" w="full" h="full">
|
||||
<SimpleGrid
|
||||
my="auto"
|
||||
w="full"
|
||||
columns={{
|
||||
base: 3,
|
||||
lg: item?.icons.length,
|
||||
}}
|
||||
gap="1rem 0"
|
||||
py={6}
|
||||
px={4}
|
||||
>
|
||||
{item?.icons.map((itm, index) => (
|
||||
<GridItem
|
||||
key={itm.title}
|
||||
colSpan={{
|
||||
base: index === 6 ? 3 : 1,
|
||||
lg: 1,
|
||||
}}
|
||||
>
|
||||
<Item item={itm} />
|
||||
</GridItem>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
</Flex>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
@@ -1,146 +0,0 @@
|
||||
import { GradientText } from "./GradientText";
|
||||
import { KeyFeatureLayout } from "./KeyFeatureLayout";
|
||||
import {
|
||||
Flex,
|
||||
GridItem,
|
||||
LinkBox,
|
||||
LinkOverlay,
|
||||
SimpleGrid,
|
||||
} from "@chakra-ui/react";
|
||||
import { ChakraNextImage as Image } from "components/Image";
|
||||
import { Aurora } from "components/homepage/Aurora";
|
||||
import { Heading, Text } from "tw-components";
|
||||
|
||||
const TRACKING_CATEGORY = "launch_section";
|
||||
|
||||
export const LaunchSection: React.FC = () => {
|
||||
return (
|
||||
<KeyFeatureLayout
|
||||
title="Launch"
|
||||
titleGradient="linear-gradient(65deg, #C35AB1, #E9A8D9)"
|
||||
headline="Contracts on any chain."
|
||||
description=""
|
||||
>
|
||||
<SimpleGrid columns={{ md: 2 }} gap={6}>
|
||||
<LinkBox
|
||||
as={GridItem}
|
||||
bg="#070707"
|
||||
rounded="lg"
|
||||
position="relative"
|
||||
overflow="hidden"
|
||||
>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "10%", left: "50%" }}
|
||||
color="#C45DC060"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "100%", left: "50%" }}
|
||||
color="#C45DC060"
|
||||
/>
|
||||
<Flex
|
||||
position="relative"
|
||||
flexDir="column"
|
||||
justify="space-between"
|
||||
py={12}
|
||||
px={14}
|
||||
gap={6}
|
||||
h="full"
|
||||
_hover={{ textDecoration: "none" }}
|
||||
>
|
||||
<Flex gap={6} flexDir="column">
|
||||
<Heading size="label.xl" fontSize="22" lineHeight="1.2" as="h4">
|
||||
Ship your contracts on-chain effortlessly with{" "}
|
||||
<GradientText
|
||||
as={LinkOverlay}
|
||||
href="/deploy"
|
||||
category={TRACKING_CATEGORY}
|
||||
label="deploy"
|
||||
stopOne="#C35AB1"
|
||||
stopTwo="#E9A8D9"
|
||||
>
|
||||
Deploy
|
||||
</GradientText>
|
||||
</Heading>
|
||||
<Text
|
||||
color="whiteAlpha.700"
|
||||
textAlign={{ base: "center", md: "left" }}
|
||||
>
|
||||
A deployment workflow designed for you to collaborate easily
|
||||
with your dev team.
|
||||
</Text>
|
||||
</Flex>
|
||||
<Image
|
||||
pointerEvents="none"
|
||||
w="full"
|
||||
src={require("/public/assets/landingpage/launch-deploy.png")}
|
||||
alt=""
|
||||
/>
|
||||
</Flex>
|
||||
</LinkBox>
|
||||
<LinkBox
|
||||
as={GridItem}
|
||||
bg="#070707"
|
||||
rounded="lg"
|
||||
position="relative"
|
||||
overflow="hidden"
|
||||
>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "10%", left: "50%" }}
|
||||
color="#C45DC060"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "150%", height: "200%" }}
|
||||
pos={{ top: "100%", left: "50%" }}
|
||||
color="#C45DC060"
|
||||
/>
|
||||
<Flex
|
||||
position="relative"
|
||||
flexDir="column"
|
||||
justify="space-between"
|
||||
py={12}
|
||||
px={14}
|
||||
gap={6}
|
||||
h="full"
|
||||
_hover={{ textDecoration: "none" }}
|
||||
>
|
||||
<Flex gap={6} flexDir="column">
|
||||
<Heading size="label.xl" fontSize="22" lineHeight="1.2" as="h4">
|
||||
Make your contracts discoverable with{" "}
|
||||
<GradientText
|
||||
as={LinkOverlay}
|
||||
href="/publish"
|
||||
category={TRACKING_CATEGORY}
|
||||
label="release"
|
||||
stopOne="#C35AB1"
|
||||
stopTwo="#E9A8D9"
|
||||
>
|
||||
Publish
|
||||
</GradientText>
|
||||
</Heading>
|
||||
<Text
|
||||
color="whiteAlpha.700"
|
||||
textAlign={{ base: "center", md: "left" }}
|
||||
>
|
||||
Be discovered by our community of over 70k+ world-class web3
|
||||
developers.
|
||||
</Text>
|
||||
</Flex>
|
||||
<Image
|
||||
pointerEvents="none"
|
||||
w="full"
|
||||
src={require("/public/assets/landingpage/launch-publish.png")}
|
||||
alt=""
|
||||
/>
|
||||
</Flex>
|
||||
</LinkBox>
|
||||
</SimpleGrid>
|
||||
</KeyFeatureLayout>
|
||||
);
|
||||
};
|
||||
@@ -1,187 +0,0 @@
|
||||
import { GradientText } from "./GradientText";
|
||||
import { KeyFeatureLayout } from "./KeyFeatureLayout";
|
||||
import {
|
||||
Box,
|
||||
Flex,
|
||||
GridItem,
|
||||
LinkBox,
|
||||
LinkOverlay,
|
||||
SimpleGrid,
|
||||
} from "@chakra-ui/react";
|
||||
import { ChakraNextImage as Image } from "components/Image";
|
||||
import { Aurora } from "components/homepage/Aurora";
|
||||
import React from "react";
|
||||
import { Heading } from "tw-components";
|
||||
|
||||
const TRACKING_CATEGORY = "manage_section";
|
||||
|
||||
export const ManageSection: React.FC = () => {
|
||||
return (
|
||||
<KeyFeatureLayout
|
||||
title="Manage"
|
||||
titleGradient="linear-gradient(70deg, #4F3DA5, #8E81D0)"
|
||||
headline="Your onchain data."
|
||||
description=""
|
||||
>
|
||||
<SimpleGrid columns={{ md: 11 }} gap={6}>
|
||||
<LinkBox
|
||||
as={GridItem}
|
||||
colSpan={{ md: 6 }}
|
||||
bg="#070707"
|
||||
rounded="lg"
|
||||
position="relative"
|
||||
overflow="hidden"
|
||||
>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "125%", height: "200%" }}
|
||||
pos={{ top: "40%", left: "30%" }}
|
||||
color="#9786DF60"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "125%", height: "200%" }}
|
||||
pos={{ top: "20%", left: "100%" }}
|
||||
color="#9786DF60"
|
||||
/>
|
||||
<Flex
|
||||
position="relative"
|
||||
flexDir="column"
|
||||
justify="space-between"
|
||||
px={14}
|
||||
_hover={{ textDecoration: "none" }}
|
||||
>
|
||||
<Heading
|
||||
size="label.xl"
|
||||
fontSize="22"
|
||||
lineHeight="1.2"
|
||||
py={12}
|
||||
as="h4"
|
||||
>
|
||||
Monitor and configure your contracts from your{" "}
|
||||
<GradientText
|
||||
as={LinkOverlay}
|
||||
href="/dashboards"
|
||||
category={TRACKING_CATEGORY}
|
||||
label="dashboard"
|
||||
stopOne="#4F3DA5"
|
||||
stopTwo="#8E81D0"
|
||||
>
|
||||
Dashboard
|
||||
</GradientText>
|
||||
</Heading>
|
||||
<Image
|
||||
pointerEvents="none"
|
||||
w="full"
|
||||
src={require("/public/assets/landingpage/manage-dashboard.png")}
|
||||
alt=""
|
||||
/>
|
||||
</Flex>
|
||||
</LinkBox>
|
||||
<GridItem
|
||||
colSpan={{ md: 5 }}
|
||||
bg="#070707"
|
||||
rounded="lg"
|
||||
position="relative"
|
||||
overflow="hidden"
|
||||
>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "125%", height: "200%" }}
|
||||
pos={{ top: "40%", left: "30%" }}
|
||||
color="#9786DF40"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "125%", height: "200%" }}
|
||||
pos={{ top: "40%", left: "100%" }}
|
||||
color="#9786DF60"
|
||||
/>
|
||||
<Flex h="full" position="relative" flexDir="column" px={14}>
|
||||
<Heading
|
||||
size="label.xl"
|
||||
fontSize="22"
|
||||
lineHeight="1.2"
|
||||
py={12}
|
||||
as="h4"
|
||||
>
|
||||
Collaborate with your team and{" "}
|
||||
<GradientText
|
||||
category={TRACKING_CATEGORY}
|
||||
label="manage_permissions"
|
||||
stopOne="#4F3DA5"
|
||||
stopTwo="#8E81D0"
|
||||
>
|
||||
manage permissions
|
||||
</GradientText>
|
||||
</Heading>
|
||||
<Box py={6} my="auto">
|
||||
<Image
|
||||
w="full"
|
||||
src={require("/public/assets/landingpage/manage-permissions.png")}
|
||||
alt=""
|
||||
/>
|
||||
</Box>
|
||||
</Flex>
|
||||
</GridItem>
|
||||
<GridItem
|
||||
colSpan={{ md: 11 }}
|
||||
bg="#070707"
|
||||
rounded="lg"
|
||||
position="relative"
|
||||
overflow="hidden"
|
||||
>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "125%", height: "200%" }}
|
||||
pos={{ top: "60%", left: "0%" }}
|
||||
color="#9786DF40"
|
||||
/>
|
||||
<Aurora
|
||||
zIndex="auto"
|
||||
size={{ width: "125%", height: "200%" }}
|
||||
pos={{ top: "40%", left: "70%" }}
|
||||
color="#9786DF40"
|
||||
/>
|
||||
<SimpleGrid columns={{ md: 2 }} h="full" position="relative">
|
||||
<Flex
|
||||
h="full"
|
||||
flexDir="column"
|
||||
justify="center"
|
||||
px={14}
|
||||
py={12}
|
||||
w="full"
|
||||
gap={6}
|
||||
>
|
||||
<Heading
|
||||
lineHeight="1.2"
|
||||
size="label.xl"
|
||||
fontSize="22"
|
||||
maxW={320}
|
||||
textAlign={{ base: "center", md: "left" }}
|
||||
as="h4"
|
||||
>
|
||||
<GradientText
|
||||
category={TRACKING_CATEGORY}
|
||||
label="reports"
|
||||
stopOne="#4F3DA5"
|
||||
stopTwo="#8E81D0"
|
||||
>
|
||||
Automatic pre-built reports
|
||||
</GradientText>{" "}
|
||||
with on-chain analytics.
|
||||
</Heading>
|
||||
</Flex>
|
||||
<Box pt={6} px={8}>
|
||||
<Image
|
||||
h="full"
|
||||
src={require("/public/assets/landingpage/manage-reports.png")}
|
||||
alt=""
|
||||
/>
|
||||
</Box>
|
||||
</SimpleGrid>
|
||||
</GridItem>
|
||||
</SimpleGrid>
|
||||
</KeyFeatureLayout>
|
||||
);
|
||||
};
|
||||
@@ -6,7 +6,7 @@ import { FiUpload } from "react-icons/fi";
|
||||
import { Button, ButtonProps } from "tw-components";
|
||||
import { ComponentWithChildren } from "types/component-with-children";
|
||||
|
||||
export interface IpfsUploadButtonProps extends ButtonProps {
|
||||
interface IpfsUploadButtonProps extends ButtonProps {
|
||||
storageUpload: UseMutationResult<string[], unknown, any, unknown>;
|
||||
onUpload: (uri: string) => void;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ import {
|
||||
|
||||
const TRACKING_CATEGORY = "ipfs_uploader";
|
||||
|
||||
export interface IpfsUploadDropzoneProps {}
|
||||
interface IpfsUploadDropzoneProps {}
|
||||
|
||||
export const IpfsUploadDropzone: React.FC<IpfsUploadDropzoneProps> = () => {
|
||||
const address = useAddress();
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
import { LandingDesktopMobileImage } from "./desktop-mobile-image";
|
||||
import { LandingSectionHeading } from "./section-heading";
|
||||
import {
|
||||
LandingDesktopMobileImageProps,
|
||||
LandingSectionHeadingProps,
|
||||
} from "./types";
|
||||
import { Flex } from "@chakra-ui/react";
|
||||
|
||||
type LandingMainImageProps = LandingSectionHeadingProps &
|
||||
LandingDesktopMobileImageProps;
|
||||
|
||||
export const LandingMainImage: React.FC<LandingMainImageProps> = ({
|
||||
image,
|
||||
mobileImage,
|
||||
blackToWhiteTitle,
|
||||
title,
|
||||
}) => {
|
||||
return (
|
||||
<Flex flexDir="column" gap={20}>
|
||||
<LandingSectionHeading
|
||||
blackToWhiteTitle={blackToWhiteTitle}
|
||||
title={title}
|
||||
/>
|
||||
<LandingDesktopMobileImage image={image} mobileImage={mobileImage} />
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
@@ -2,13 +2,6 @@ import { ChakraNextImageProps } from "components/Image";
|
||||
import { StaticImageData } from "next/image";
|
||||
import { HeadingSizes } from "theme/typography";
|
||||
|
||||
export type Guide = {
|
||||
title: string;
|
||||
description?: string;
|
||||
image: string;
|
||||
link: string;
|
||||
};
|
||||
|
||||
export type LandingDesktopMobileImageProps = ChakraNextImageProps & {
|
||||
image?: StaticImageData;
|
||||
mobileImage?: StaticImageData;
|
||||
|
||||
@@ -84,7 +84,7 @@ export const IconLogo: React.FC<Omit<AspectRatioProps, "ratio">> = ({
|
||||
);
|
||||
};
|
||||
|
||||
export const Wordmark: React.FC<Omit<AspectRatioProps, "ratio">> = ({
|
||||
const Wordmark: React.FC<Omit<AspectRatioProps, "ratio">> = ({
|
||||
color = "var(--chakra-colors-wordmark)",
|
||||
...props
|
||||
}) => {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { ComponentWithChildren } from "types/component-with-children";
|
||||
|
||||
const gap = { base: "40px", lg: "60px" };
|
||||
|
||||
export const MarqueeGroup: ComponentWithChildren<{
|
||||
const MarqueeGroup: ComponentWithChildren<{
|
||||
ariaHidden: boolean;
|
||||
animationDirection?: "normal" | "reverse";
|
||||
}> = ({ ariaHidden, children, animationDirection = "normal" }) => {
|
||||
|
||||
@@ -88,7 +88,7 @@ const PARTNER_LOGO_MAP = {
|
||||
},
|
||||
} as const;
|
||||
|
||||
export type Partner = keyof typeof PARTNER_LOGO_MAP;
|
||||
type Partner = keyof typeof PARTNER_LOGO_MAP;
|
||||
|
||||
interface PartnerLogoProps {
|
||||
partner: Partner;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { usePaymentsKycStatus } from "@3rdweb-sdk/react/hooks/usePayments";
|
||||
import { Alert, AlertIcon, AlertDescription } from "@chakra-ui/react";
|
||||
import { Text } from "tw-components";
|
||||
|
||||
export const SellerVerificationStatusRecord: Record<
|
||||
const SellerVerificationStatusRecord: Record<
|
||||
string,
|
||||
{ message: string; type: "error" | "info" | "success" }
|
||||
> = {
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
} from "@3rdweb-sdk/react/hooks/usePayments";
|
||||
import { useMemo } from "react";
|
||||
|
||||
export interface PaymentsWebhooksCreateButtonProps {
|
||||
interface PaymentsWebhooksCreateButtonProps {
|
||||
paymentsSellerId: string;
|
||||
existingWebhooks: PaymentsWebhooksType[];
|
||||
isMainnets: boolean;
|
||||
|
||||
@@ -26,7 +26,7 @@ import { useForm } from "react-hook-form";
|
||||
import { FiTrash } from "react-icons/fi";
|
||||
import { BiPencil } from "react-icons/bi";
|
||||
|
||||
export interface PaymentsWebhooksTableProps {
|
||||
interface PaymentsWebhooksTableProps {
|
||||
paymentsSellerId: string;
|
||||
webhooks: PaymentsWebhooksType[];
|
||||
isLoading: boolean;
|
||||
|
||||
@@ -38,7 +38,7 @@ import { AiOutlineExperiment } from "@react-icons/all-files/ai/AiOutlineExperime
|
||||
import { MdBlock } from "@react-icons/all-files/md/MdBlock";
|
||||
import { MdCheck } from "@react-icons/all-files/md/MdCheck";
|
||||
|
||||
export interface PaymentsWebhooksTestButtonProps {
|
||||
interface PaymentsWebhooksTestButtonProps {
|
||||
paymentsSellerId: string;
|
||||
isMainnets: boolean;
|
||||
webhooks: PaymentsWebhooksType[];
|
||||
@@ -57,7 +57,7 @@ const beautifyString = (responseBody: string) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const StatusTag = ({ status }: { status: number }) => {
|
||||
const StatusTag = ({ status }: { status: number }) => {
|
||||
const isSuccess = status >= 200 && status < 300;
|
||||
return (
|
||||
<Tag
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
TrackedIconButton,
|
||||
} from "tw-components";
|
||||
|
||||
export type Game = {
|
||||
type Game = {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
|
||||
@@ -15,7 +15,7 @@ import { FiChevronRight } from "react-icons/fi";
|
||||
import { Heading, LinkButton, Text, TrackedLink } from "tw-components";
|
||||
import { ComponentWithChildren } from "types/component-with-children";
|
||||
|
||||
export interface HeroProps {
|
||||
interface HeroProps {
|
||||
name: string;
|
||||
title: string;
|
||||
description: ReactNode;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { IconType } from "@react-icons/all-files";
|
||||
import { StaticImageData } from "next/image";
|
||||
import { Text } from "tw-components";
|
||||
|
||||
export interface ProductSectionItemProps {
|
||||
interface ProductSectionItemProps {
|
||||
name: string;
|
||||
description: string;
|
||||
href?: string;
|
||||
|
||||
@@ -37,28 +37,6 @@ export const FieldAlert = ({
|
||||
);
|
||||
};
|
||||
|
||||
export const NoTargetAddressesAlert = ({
|
||||
serviceName,
|
||||
serviceDesc,
|
||||
}: {
|
||||
serviceName: string;
|
||||
serviceDesc: string;
|
||||
}) => {
|
||||
return (
|
||||
<Alert status="warning" variant="left-accent">
|
||||
<Flex direction="column" gap={2}>
|
||||
<Heading size="label.md" as={AlertTitle}>
|
||||
No Contract Addresses Configured
|
||||
</Heading>
|
||||
<Text size="body.sm" as={AlertDescription}>
|
||||
Your key will not be able to use {serviceName} - {serviceDesc}. Either
|
||||
disable a service or specify allowed contract addresses.
|
||||
</Text>
|
||||
</Flex>
|
||||
</Alert>
|
||||
);
|
||||
};
|
||||
|
||||
export const SmartWalletsBillingAlert = ({
|
||||
dismissable = false,
|
||||
}: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const Message = {
|
||||
const Message = {
|
||||
NoDomainsTitle: "No Domains Configured",
|
||||
NoDomainsDescription:
|
||||
"This will deny requests from all origins, rendering the key unusable in frontend applications. Proceed only if you intend to use this key in server or native apps environments.",
|
||||
|
||||
@@ -10,16 +10,16 @@ import { useLoggedInUser } from "@3rdweb-sdk/react/hooks/useLoggedInUser";
|
||||
import { toSize } from "utils/number";
|
||||
import { TWQueryTable } from "components/shared/TWQueryTable";
|
||||
|
||||
export interface PinnedFilesResponse {
|
||||
interface PinnedFilesResponse {
|
||||
result: PinnedFilesResult;
|
||||
}
|
||||
|
||||
export interface PinnedFilesResult {
|
||||
interface PinnedFilesResult {
|
||||
pinnedFiles: PinnedFile[];
|
||||
count: number;
|
||||
}
|
||||
|
||||
export interface PinnedFile {
|
||||
interface PinnedFile {
|
||||
ipfsHash: string;
|
||||
fileSizeBytes: string;
|
||||
pinnedAt: string;
|
||||
|
||||
@@ -159,13 +159,13 @@ export function SocialButton(props: {
|
||||
);
|
||||
}
|
||||
|
||||
export const googleIconUri =
|
||||
const googleIconUri =
|
||||
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3MDUuNiIgaGVpZ2h0PSI3MjAiIHZpZXdCb3g9IjAgMCAxODYuNjkgMTkwLjUiIHhtbG5zOnY9Imh0dHBzOi8vdmVjdGEuaW8vbmFubyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTE4NC41ODMgNzY1LjE3MSkiPjxwYXRoIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIgZD0iTS0xMDg5LjMzMy02ODcuMjM5djM2Ljg4OGg1MS4yNjJjLTIuMjUxIDExLjg2My05LjAwNiAyMS45MDgtMTkuMTM3IDI4LjY2MmwzMC45MTMgMjMuOTg2YzE4LjAxMS0xNi42MjUgMjguNDAyLTQxLjA0NCAyOC40MDItNzAuMDUyIDAtNi43NTQtLjYwNi0xMy4yNDktMS43MzItMTkuNDgzeiIgZmlsbD0iIzQyODVmNCIvPjxwYXRoIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIgZD0iTS0xMTQyLjcxNC02NTEuNzkxbC02Ljk3MiA1LjMzNy0yNC42NzkgMTkuMjIzaDBjMTUuNjczIDMxLjA4NiA0Ny43OTYgNTIuNTYxIDg1LjAzIDUyLjU2MSAyNS43MTcgMCA0Ny4yNzgtOC40ODYgNjMuMDM4LTIzLjAzM2wtMzAuOTEzLTIzLjk4NmMtOC40ODYgNS43MTUtMTkuMzEgOS4xNzktMzIuMTI1IDkuMTc5LTI0Ljc2NSAwLTQ1LjgwNi0xNi43MTItNTMuMzQtMzkuMjI2eiIgZmlsbD0iIzM0YTg1MyIvPjxwYXRoIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIgZD0iTS0xMTc0LjM2NS03MTIuNjFjLTYuNDk0IDEyLjgxNS0xMC4yMTcgMjcuMjc2LTEwLjIxNyA0Mi42ODlzMy43MjMgMjkuODc0IDEwLjIxNyA0Mi42ODljMCAuMDg2IDMxLjY5My0yNC41OTIgMzEuNjkzLTI0LjU5Mi0xLjkwNS01LjcxNS0zLjAzMS0xMS43NzYtMy4wMzEtMTguMDk4czEuMTI2LTEyLjM4MyAzLjAzMS0xOC4wOTh6IiBmaWxsPSIjZmJiYzA1Ii8+PHBhdGggZD0iTS0xMDg5LjMzMy03MjcuMjQ0YzE0LjAyOCAwIDI2LjQ5NyA0Ljg0OSAzNi40NTUgMTQuMjAxbDI3LjI3Ni0yNy4yNzZjLTE2LjUzOS0xNS40MTMtMzguMDEzLTI0Ljg1Mi02My43MzEtMjQuODUyLTM3LjIzNCAwLTY5LjM1OSAyMS4zODgtODUuMDMyIDUyLjU2MWwzMS42OTIgMjQuNTkyYzcuNTMzLTIyLjUxNCAyOC41NzUtMzkuMjI2IDUzLjM0LTM5LjIyNnoiIGZpbGw9IiNlYTQzMzUiIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIvPjwvZz48L3N2Zz4=";
|
||||
export const facebookIconUri =
|
||||
const facebookIconUri =
|
||||
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbmFtZT0iRWJlbmUgMSIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgaWQ9ImZhY2Vib29rLWxvZ28tMjAxOSI+PHBhdGggZmlsbD0iIzE4NzdmMiIgZD0iTTEwMjQsNTEyQzEwMjQsMjI5LjIzMDE2LDc5NC43Njk3OCwwLDUxMiwwUzAsMjI5LjIzMDE2LDAsNTEyYzAsMjU1LjU1NCwxODcuMjMxLDQ2Ny4zNzAxMiw0MzIsNTA1Ljc3Nzc3VjY2MEgzMDJWNTEySDQzMlYzOTkuMkM0MzIsMjcwLjg3OTgyLDUwOC40Mzg1NCwyMDAsNjI1LjM4OTIyLDIwMCw2ODEuNDA3NjUsMjAwLDc0MCwyMTAsNzQwLDIxMFYzMzZINjc1LjQzNzEzQzYxMS44MzUwOCwzMzYsNTkyLDM3NS40NjY2Nyw1OTIsNDE1Ljk1NzI4VjUxMkg3MzRMNzExLjMsNjYwSDU5MnYzNTcuNzc3NzdDODM2Ljc2OSw5NzkuMzcwMTIsMTAyNCw3NjcuNTU0LDEwMjQsNTEyWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik03MTEuMyw2NjAsNzM0LDUxMkg1OTJWNDE1Ljk1NzI4QzU5MiwzNzUuNDY2NjcsNjExLjgzNTA4LDMzNiw2NzUuNDM3MTMsMzM2SDc0MFYyMTBzLTU4LjU5MjM1LTEwLTExNC42MTA3OC0xMEM1MDguNDM4NTQsMjAwLDQzMiwyNzAuODc5ODIsNDMyLDM5OS4yVjUxMkgzMDJWNjYwSDQzMnYzNTcuNzc3NzdhNTE3LjM5NjE5LDUxNy4zOTYxOSwwLDAsMCwxNjAsMFY2NjBaIj48L3BhdGg+PC9zdmc+";
|
||||
export const appleIconUri =
|
||||
const appleIconUri =
|
||||
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDM4IiBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9IjAgMCA0OTYuMjU1IDYwOC43MjgiIGlkPSJhcHBsZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTI3My44MSA1Mi45NzNDMzEzLjgwNi4yNTcgMzY5LjQxIDAgMzY5LjQxIDBzOC4yNzEgNDkuNTYyLTMxLjQ2MyA5Ny4zMDZjLTQyLjQyNiA1MC45OC05MC42NDkgNDIuNjM4LTkwLjY0OSA0Mi42MzhzLTkuMDU1LTQwLjA5NCAyNi41MTItODYuOTcxek0yNTIuMzg1IDE3NC42NjJjMjAuNTc2IDAgNTguNzY0LTI4LjI4NCAxMDguNDcxLTI4LjI4NCA4NS41NjIgMCAxMTkuMjIyIDYwLjg4MyAxMTkuMjIyIDYwLjg4M3MtNjUuODMzIDMzLjY1OS02NS44MzMgMTE1LjMzMWMwIDkyLjEzMyA4Mi4wMSAxMjMuODg1IDgyLjAxIDEyMy44ODVzLTU3LjMyOCAxNjEuMzU3LTEzNC43NjIgMTYxLjM1N2MtMzUuNTY1IDAtNjMuMjE1LTIzLjk2Ny0xMDAuNjg4LTIzLjk2Ny0zOC4xODggMC03Ni4wODQgMjQuODYxLTEwMC43NjYgMjQuODYxQzg5LjMzIDYwOC43MyAwIDQ1NS42NjYgMCAzMzIuNjI4YzAtMTIxLjA1MiA3NS42MTItMTg0LjU1NCAxNDYuNTMzLTE4NC41NTQgNDYuMTA1IDAgODEuODgzIDI2LjU4OCAxMDUuODUyIDI2LjU4OHoiPjwvcGF0aD48L3N2Zz4=";
|
||||
export const emailIcon =
|
||||
const emailIcon =
|
||||
"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzM1ODlfODY0OSkiPgo8cmVjdCB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHJ4PSI4IiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfMzU4OV84NjQ5KSIvPgo8cmVjdCB4PSItMSIgeT0iLTEiIHdpZHRoPSI1MCIgaGVpZ2h0PSI1MCIgcng9IjkuOCIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzM1ODlfODY0OSkiLz4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAxXzM1ODlfODY0OSkiPgo8cGF0aCBkPSJNMjQgMTQuMjVDMTguNjE3MiAxNC4yNSAxNC4yNSAxOC42MTcyIDE0LjI1IDI0QzE0LjI1IDI5LjM4MjggMTguNjE3MiAzMy43NSAyNCAzMy43NUMyNC44OTg4IDMzLjc1IDI1LjYyNSAzNC40NzYyIDI1LjYyNSAzNS4zNzVDMjUuNjI1IDM2LjI3MzggMjQuODk4OCAzNyAyNCAzN0MxNi44MTk1IDM3IDExIDMxLjE4MDUgMTEgMjRDMTEgMTYuODE5NSAxNi44MTk1IDExIDI0IDExQzMxLjE4MDUgMTEgMzcgMTYuODE5NSAzNyAyNFYyNS42MjVDMzcgMjguMzE2NCAzNC44MTY0IDMwLjUgMzIuMTI1IDMwLjVDMzAuNjM3MSAzMC41IDI5LjMwMTYgMjkuODI5NyAyOC40MDc4IDI4Ljc3ODVDMjcuMjUgMjkuODQ0OSAyNS43MDEyIDMwLjUgMjQgMzAuNUMyMC40MDk4IDMwLjUgMTcuNSAyNy41OTAyIDE3LjUgMjRDMTcuNSAyMC40MDk4IDIwLjQwOTggMTcuNSAyNCAxNy41QzI1LjQxNjggMTcuNSAyNi43MjcgMTcuOTUyIDI3Ljc5MzQgMTguNzIzOEMyOC4wODI4IDE4LjQ2OTkgMjguNDU4NiAxOC4zMTI1IDI4Ljg3NSAxOC4zMTI1QzI5Ljc3MzggMTguMzEyNSAzMC41IDE5LjAzODcgMzAuNSAxOS45Mzc1VjI1LjYyNUMzMC41IDI2LjUyMzggMzEuMjI2MiAyNy4yNSAzMi4xMjUgMjcuMjVDMzMuMDIzOCAyNy4yNSAzMy43NSAyNi41MjM4IDMzLjc1IDI1LjYyNVYyNEMzMy43NSAxOC42MTcyIDI5LjM4MjggMTQuMjUgMjQgMTQuMjVaTTI3LjI1IDI0QzI3LjI1IDIzLjEzOCAyNi45MDc2IDIyLjMxMTQgMjYuMjk4MSAyMS43MDE5QzI1LjY4ODYgMjEuMDkyNCAyNC44NjIgMjAuNzUgMjQgMjAuNzVDMjMuMTM4IDIwLjc1IDIyLjMxMTQgMjEuMDkyNCAyMS43MDE5IDIxLjcwMTlDMjEuMDkyNCAyMi4zMTE0IDIwLjc1IDIzLjEzOCAyMC43NSAyNEMyMC43NSAyNC44NjIgMjEuMDkyNCAyNS42ODg2IDIxLjcwMTkgMjYuMjk4MUMyMi4zMTE0IDI2LjkwNzYgMjMuMTM4IDI3LjI1IDI0IDI3LjI1QzI0Ljg2MiAyNy4yNSAyNS42ODg2IDI2LjkwNzYgMjYuMjk4MSAyNi4yOTgxQzI2LjkwNzYgMjUuNjg4NiAyNy4yNSAyNC44NjIgMjcuMjUgMjRaIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+CjwvZz4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8zNTg5Xzg2NDkiIHgxPSIyNS41IiB5MT0iLTYuMjk1NzJlLTA2IiB4Mj0iMzAuMjAxNiIgeTI9IjQ3LjUzNSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjODM1OEJBIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzdCMUNGNyIvPgo8L2xpbmVhckdyYWRpZW50Pgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MV9saW5lYXJfMzU4OV84NjQ5IiB4MT0iMjUuNTYyNSIgeTE9Ii0xLjAwMDAxIiB4Mj0iMzAuNDYiIHkyPSI0OC41MTU2IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiM4MzU4QkEiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjN0IxQ0Y3Ii8+CjwvbGluZWFyR3JhZGllbnQ+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMzU4OV84NjQ5Ij4KPHJlY3Qgd2lkdGg9IjQ4IiBoZWlnaHQ9IjQ4IiByeD0iOCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPGNsaXBQYXRoIGlkPSJjbGlwMV8zNTg5Xzg2NDkiPgo8cmVjdCB3aWR0aD0iMjYiIGhlaWdodD0iMjYiIGZpbGw9IndoaXRlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMSAxMSkiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K";
|
||||
|
||||
const socialIconMap = {
|
||||
|
||||
@@ -40,7 +40,7 @@ export const hideUIForWalletIdsMobile = new Set([
|
||||
trustWalletConfig.id,
|
||||
]);
|
||||
|
||||
export type WalletInfo = {
|
||||
type WalletInfo = {
|
||||
code: (isReccomended?: boolean) => string;
|
||||
component: WalletConfig<any>;
|
||||
import: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const THIRDWEB_DEPLOYER_ADDRESS =
|
||||
"0xdd99b75f095d0c4d5112aCe938e4e6ed962fb024";
|
||||
|
||||
export const THIRDWEB_DEPLOYER_ENS = "deployer.thirdweb.eth";
|
||||
const THIRDWEB_DEPLOYER_ENS = "deployer.thirdweb.eth";
|
||||
|
||||
@@ -240,7 +240,7 @@ export const ROLE_DESCRIPTION_MAP: Record<Role | string, string> = {
|
||||
};
|
||||
|
||||
// gnosis mappings
|
||||
export const GNOSIS_TO_CHAIN_ID = {
|
||||
const GNOSIS_TO_CHAIN_ID = {
|
||||
// supported mainnets
|
||||
eth: 1,
|
||||
matic: 137,
|
||||
|
||||
@@ -25,7 +25,7 @@ export const SupportedChainsContext = createContext<StoredChain[] | undefined>(
|
||||
/**
|
||||
* holds the "modified chains" array
|
||||
*/
|
||||
export const ModifiedChainsContext = createContext<StoredChain[] | undefined>(
|
||||
const ModifiedChainsContext = createContext<StoredChain[] | undefined>(
|
||||
undefined,
|
||||
);
|
||||
|
||||
|
||||
@@ -140,10 +140,10 @@ export function useErrorHandler() {
|
||||
return useContext(ErrorContext);
|
||||
}
|
||||
|
||||
export function isError(value: unknown): value is Error {
|
||||
function isError(value: unknown): value is Error {
|
||||
return value instanceof Error;
|
||||
}
|
||||
|
||||
export function isTransactionError(error: unknown): error is TransactionError {
|
||||
function isTransactionError(error: unknown): error is TransactionError {
|
||||
return error instanceof Object && "reason" in error && "info" in error;
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
import { SolidityInput, SolidityInputWithTypeProps } from ".";
|
||||
import { SolidityRawInput } from "./raw-input";
|
||||
import { Box, Flex, Icon, IconButton, InputGroup } from "@chakra-ui/react";
|
||||
import { IoMdAdd } from "@react-icons/all-files/io/IoMdAdd";
|
||||
import { useState } from "react";
|
||||
import { useFieldArray, useForm } from "react-hook-form";
|
||||
import { FiTrash } from "react-icons/fi";
|
||||
import { Button, Text } from "tw-components";
|
||||
|
||||
// TODO: Not used right now, but will be used in the future
|
||||
export const SolidityArrayInput: React.FC<SolidityInputWithTypeProps> = ({
|
||||
formContext: form,
|
||||
solidityType,
|
||||
...inputProps
|
||||
}) => {
|
||||
const { name, ...restOfInputProps } = inputProps;
|
||||
const inputName = name as string;
|
||||
const [showRawInput, setShowRawInput] = useState(false);
|
||||
const localForm = useForm({ defaultValues: { array: [{ value: "" }] } });
|
||||
const { fields, append, remove } = useFieldArray({
|
||||
name: "array",
|
||||
control: localForm.control,
|
||||
});
|
||||
|
||||
const typeWithoutArray = solidityType.replace("[]", "");
|
||||
|
||||
if (showRawInput) {
|
||||
return (
|
||||
<Flex flexDir="column" gap={2}>
|
||||
<SolidityRawInput
|
||||
formContext={form}
|
||||
solidityType={solidityType}
|
||||
{...restOfInputProps}
|
||||
name={inputName}
|
||||
/>
|
||||
<Text
|
||||
size="label.sm"
|
||||
textAlign="right"
|
||||
color="blue.600"
|
||||
onClick={() => setShowRawInput(false)}
|
||||
cursor="pointer"
|
||||
>
|
||||
Switch to Interface
|
||||
</Text>
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Flex flexDir="column" gap={2}>
|
||||
{fields.map((field, index) => {
|
||||
return (
|
||||
<InputGroup key={field.id} gap={2}>
|
||||
<SolidityInput
|
||||
solidityType={typeWithoutArray}
|
||||
w="full"
|
||||
isRequired
|
||||
{...localForm.register(`array.${index}.value` as const)}
|
||||
/>
|
||||
<IconButton
|
||||
aria-label="Remove"
|
||||
onClick={() => {
|
||||
remove(index);
|
||||
}}
|
||||
icon={<Icon as={FiTrash} />}
|
||||
>
|
||||
Remove
|
||||
</IconButton>
|
||||
</InputGroup>
|
||||
);
|
||||
})}
|
||||
<Flex align="center" gap={2}>
|
||||
<Box w="50%">
|
||||
<Button
|
||||
size="sm"
|
||||
leftIcon={<IoMdAdd />}
|
||||
onClick={() => append({ value: "" })}
|
||||
>
|
||||
Add Input
|
||||
</Button>
|
||||
</Box>
|
||||
<Flex w="50%" direction="column">
|
||||
<Text
|
||||
size="label.sm"
|
||||
textAlign="right"
|
||||
color="blue.600"
|
||||
onClick={() => setShowRawInput(true)}
|
||||
cursor="pointer"
|
||||
>
|
||||
Switch to Raw Input
|
||||
</Text>
|
||||
</Flex>
|
||||
</Flex>
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
@@ -24,7 +24,7 @@ export interface SolidityInputWithTypeProps extends SolidityInputProps {
|
||||
| undefined;
|
||||
functionName?: string;
|
||||
}
|
||||
export interface SolidityInputPropsOptionalFormProps extends InputProps {
|
||||
interface SolidityInputPropsOptionalFormProps extends InputProps {
|
||||
solidityType: string;
|
||||
solidityName?: string;
|
||||
solidityComponents?:
|
||||
@@ -54,15 +54,6 @@ export const SolidityInput = React.forwardRef<
|
||||
);
|
||||
}
|
||||
|
||||
/* if (solidityType === "address[]") {
|
||||
return (
|
||||
<SolidityArrayInput
|
||||
formContext={form}
|
||||
solidityType={solidityType}
|
||||
{...inputProps}
|
||||
/>
|
||||
);
|
||||
} else */
|
||||
if (solidityType?.endsWith("[]")) {
|
||||
return (
|
||||
<SolidityRawInput
|
||||
|
||||
@@ -54,7 +54,7 @@ import { Button, Heading, MenuItem, Text } from "tw-components";
|
||||
import * as z from "zod";
|
||||
import { ZodError } from "zod";
|
||||
|
||||
export type ClaimConditionDashboardInput = ClaimConditionInput & {
|
||||
type ClaimConditionDashboardInput = ClaimConditionInput & {
|
||||
isEditing: boolean;
|
||||
fromSdk: boolean;
|
||||
};
|
||||
@@ -145,12 +145,12 @@ const getClaimConditionTypeFromPhase = (
|
||||
return "custom";
|
||||
};
|
||||
|
||||
export type FormData = z.input<typeof ClaimConditionsSchema>;
|
||||
type FormData = z.input<typeof ClaimConditionsSchema>;
|
||||
|
||||
export type ControlledField = UseFieldArrayReturn<FormData>["fields"][number] &
|
||||
type ControlledField = UseFieldArrayReturn<FormData>["fields"][number] &
|
||||
FormData["phases"][number];
|
||||
|
||||
export interface ClaimsConditionFormContextData {
|
||||
interface ClaimsConditionFormContextData {
|
||||
form: UseFormReturn<FormData>;
|
||||
field: ControlledField;
|
||||
phaseIndex: number;
|
||||
@@ -167,7 +167,7 @@ export interface ClaimsConditionFormContextData {
|
||||
claimConditionType: ClaimConditionType;
|
||||
}
|
||||
|
||||
export const ClaimsConditionFormContext = React.createContext<
|
||||
const ClaimsConditionFormContext = React.createContext<
|
||||
ClaimsConditionFormContextData | undefined
|
||||
>(undefined);
|
||||
|
||||
@@ -180,7 +180,7 @@ export function useClaimConditionsFormContext() {
|
||||
return data;
|
||||
}
|
||||
|
||||
export interface ClaimConditionsFormProps {
|
||||
interface ClaimConditionsFormProps {
|
||||
contract: DropContract;
|
||||
tokenId?: string;
|
||||
isColumn?: true;
|
||||
|
||||
@@ -7,7 +7,7 @@ import { hasNewClaimConditions } from "lib/claimcondition-utils";
|
||||
import React, { useMemo } from "react";
|
||||
import { Heading, Text } from "tw-components";
|
||||
|
||||
export interface ClaimConditionsProps {
|
||||
interface ClaimConditionsProps {
|
||||
contract?: DropContract;
|
||||
tokenId?: string;
|
||||
isColumn?: true;
|
||||
|
||||
@@ -43,7 +43,7 @@ import { Column, usePagination, useTable } from "react-table";
|
||||
import { Button, Drawer, Heading, Text } from "tw-components";
|
||||
import { csvMimeTypes } from "utils/batch";
|
||||
|
||||
export interface SnapshotAddressInput {
|
||||
interface SnapshotAddressInput {
|
||||
address: string;
|
||||
maxClaimable?: string;
|
||||
price?: string;
|
||||
|
||||
@@ -357,7 +357,7 @@ interface SnippetOptions {
|
||||
clientId?: string;
|
||||
}
|
||||
|
||||
export function formatSnippet(
|
||||
function formatSnippet(
|
||||
snippet: Record<CodeEnvironment, any>,
|
||||
{
|
||||
contractAddress,
|
||||
|
||||
@@ -7,7 +7,7 @@ import { MarketplaceV3 } from "@thirdweb-dev/sdk";
|
||||
import { MarketplaceTable } from "contract-ui/tabs/shared-components/marketplace-table";
|
||||
import { useState } from "react";
|
||||
|
||||
export interface DirectListingsTableProps {
|
||||
interface DirectListingsTableProps {
|
||||
contract: MarketplaceV3;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { MarketplaceV3 } from "@thirdweb-dev/sdk";
|
||||
import { MarketplaceTable } from "contract-ui/tabs/shared-components/marketplace-table";
|
||||
import { useState } from "react";
|
||||
|
||||
export interface EnglishAuctionsTableProps {
|
||||
interface EnglishAuctionsTableProps {
|
||||
contract: MarketplaceV3;
|
||||
}
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ interface EventsFeedItemProps {
|
||||
chainSlug?: string;
|
||||
}
|
||||
|
||||
export const EventsFeedItem: React.FC<EventsFeedItemProps> = ({
|
||||
const EventsFeedItem: React.FC<EventsFeedItemProps> = ({
|
||||
transaction,
|
||||
setSelectedEvent,
|
||||
contractAddress,
|
||||
|
||||
@@ -116,7 +116,7 @@ interface EventsFeedItemProps {
|
||||
transaction: ContractTransaction;
|
||||
}
|
||||
|
||||
export const EventsFeedItem: React.FC<EventsFeedItemProps> = ({
|
||||
const EventsFeedItem: React.FC<EventsFeedItemProps> = ({
|
||||
transaction,
|
||||
}) => {
|
||||
const toast = useToast();
|
||||
|
||||
@@ -123,7 +123,7 @@ interface PermissionsItemProps {
|
||||
data: { member: string; roles: string[] };
|
||||
}
|
||||
|
||||
export const PermissionsItem: React.FC<PermissionsItemProps> = ({ data }) => {
|
||||
const PermissionsItem: React.FC<PermissionsItemProps> = ({ data }) => {
|
||||
const toast = useToast();
|
||||
const { onCopy, setValue } = useClipboard(data.member);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ import {
|
||||
} from "@thirdweb-dev/react";
|
||||
import { detectFeatures } from "components/contract-components/utils";
|
||||
import { BiPencil } from "react-icons/bi";
|
||||
import { Checkout } from "graphql/generated_types";
|
||||
import { Checkout } from "graphql/generated";
|
||||
import { ApiKeysMenu } from "components/settings/ApiKeys/Menu";
|
||||
import { useApiKeys } from "@3rdweb-sdk/react/hooks/useApi";
|
||||
import { PaymentsSettingsFileUploader } from "components/payments/settings/payment-settings-file-uploader";
|
||||
|
||||
@@ -16,7 +16,7 @@ import { IoMdCheckmark } from "react-icons/io";
|
||||
import { FiCopy } from "react-icons/fi";
|
||||
import { AiOutlineQrcode } from "react-icons/ai";
|
||||
import { RemoveCheckoutButton } from "./remove-checkout-button";
|
||||
import { Checkout } from "graphql/generated_types";
|
||||
import { Checkout } from "graphql/generated";
|
||||
|
||||
interface PaymentCheckoutsProps {
|
||||
contractId: string;
|
||||
@@ -106,7 +106,7 @@ export const PaymentCheckouts: React.FC<PaymentCheckoutsProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
export const CopyCheckoutButton: React.FC<{ text: string }> = ({ text }) => {
|
||||
const CopyCheckoutButton: React.FC<{ text: string }> = ({ text }) => {
|
||||
const { onCopy, hasCopied } = useClipboard(text);
|
||||
const trackEvent = useTrack();
|
||||
return (
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
/* import { usePaymentsTransactions } from "@3rdweb-sdk/react/hooks/usePayments"; */
|
||||
import { Flex } from "@chakra-ui/react";
|
||||
|
||||
interface PaymentsTransactionsProps {
|
||||
contractId: string;
|
||||
}
|
||||
|
||||
export const PaymentsTransactions: React.FC<PaymentsTransactionsProps> = ({
|
||||
contractId,
|
||||
}) => {
|
||||
/* const { data: transactions } = usePaymentsTransactions(contractId); */
|
||||
|
||||
/* console.log({ transactions }); */
|
||||
return <Flex flexDir="column" gap={12}></Flex>;
|
||||
};
|
||||
@@ -1,90 +0,0 @@
|
||||
import { Box, DarkMode, Flex, LightMode } from "@chakra-ui/react";
|
||||
import { Button, FormLabel } from "tw-components";
|
||||
|
||||
export const ButtonShapeRecord: Record<string, "lg" | "none" | "full"> = {
|
||||
rounded: "lg",
|
||||
square: "none",
|
||||
pill: "full",
|
||||
};
|
||||
|
||||
const ColorSchemeRecord: Record<
|
||||
string,
|
||||
{ [key: string]: { bgColor: string; color: string } }
|
||||
> = {
|
||||
light: {
|
||||
gray: { bgColor: "#000", color: "#fff" },
|
||||
red: { bgColor: "#E53E3E", color: "#fff" },
|
||||
orange: { bgColor: "#DD6B20", color: "#fff" },
|
||||
yellow: { bgColor: "#D69E2E", color: "#000" },
|
||||
green: { bgColor: "#38A169", color: "#fff" },
|
||||
teal: { bgColor: "#319795", color: "#fff" },
|
||||
blue: { bgColor: "#3182CE", color: "#fff" },
|
||||
cyan: { bgColor: "#00B5D8", color: "#000" },
|
||||
purple: { bgColor: "#805AD5", color: "#fff" },
|
||||
pink: { bgColor: "#D53F8C", color: "#fff" },
|
||||
},
|
||||
dark: {
|
||||
gray: { bgColor: "#FFFFFF", color: "#000" },
|
||||
red: { bgColor: "#FEB2B2", color: "#000" },
|
||||
orange: { bgColor: "#FBD38D", color: "#000" },
|
||||
yellow: { bgColor: "#FAF089", color: "#000" },
|
||||
green: { bgColor: "#9AE6B4", color: "#000" },
|
||||
teal: { bgColor: "#81E6D9", color: "#000" },
|
||||
blue: { bgColor: "#90cdf4", color: "#000" },
|
||||
cyan: { bgColor: "#9DECF9", color: "#000" },
|
||||
purple: { bgColor: "#D6BCFA", color: "#000" },
|
||||
pink: { bgColor: "#FBB6CE", color: "#000" },
|
||||
},
|
||||
};
|
||||
|
||||
export const BG_COLOR_DARK_MODE = "#191D27";
|
||||
|
||||
interface PaymentsPreviewButtonProps {
|
||||
colorScheme: string;
|
||||
buttonShape: string;
|
||||
isDarkMode: boolean;
|
||||
}
|
||||
|
||||
export const PaymentsPreviewButton: React.FC<PaymentsPreviewButtonProps> = ({
|
||||
colorScheme = "red",
|
||||
buttonShape = "rounded",
|
||||
isDarkMode = false,
|
||||
}) => {
|
||||
const LightOrDarkMode = isDarkMode ? DarkMode : LightMode;
|
||||
|
||||
const colorSchemeLightOrDark =
|
||||
ColorSchemeRecord[isDarkMode ? "dark" : "light"];
|
||||
|
||||
return (
|
||||
<Flex flexDir="column" gap={2}>
|
||||
<FormLabel>Preview</FormLabel>
|
||||
<Flex
|
||||
bg={isDarkMode ? BG_COLOR_DARK_MODE : "#fff"}
|
||||
p={4}
|
||||
rounded="lg"
|
||||
w="full"
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
borderWidth={1}
|
||||
borderColor="borderColor"
|
||||
>
|
||||
<LightOrDarkMode>
|
||||
<Button
|
||||
bgColor={colorSchemeLightOrDark[colorScheme || "red"]?.bgColor}
|
||||
color={colorSchemeLightOrDark[colorScheme || "red"]?.color}
|
||||
_hover={{
|
||||
opacity: 0.8,
|
||||
}}
|
||||
rounded={ButtonShapeRecord[buttonShape]}
|
||||
px={5}
|
||||
type="button"
|
||||
>
|
||||
<Box as="span" fontWeight={400}>
|
||||
Example
|
||||
</Box>
|
||||
</Button>
|
||||
</LightOrDarkMode>
|
||||
</Flex>
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
@@ -12,7 +12,7 @@ import { useLoggedInUser } from "@3rdweb-sdk/react/hooks/useLoggedInUser";
|
||||
import { NoWalletConnectedPayments } from "./components/no-wallet-connected-payments";
|
||||
import { NoPaymentsEnabled } from "./components/no-payments-enabled";
|
||||
import { AddressCopyButton } from "tw-components/AddressCopyButton";
|
||||
import { useAccount, useApiAuthToken } from "@3rdweb-sdk/react/hooks/useApi";
|
||||
import { useApiAuthToken } from "@3rdweb-sdk/react/hooks/useApi";
|
||||
|
||||
interface ContractPaymentsPageProps {
|
||||
contractAddress?: string;
|
||||
|
||||
@@ -16,7 +16,7 @@ import { useEffect, useMemo } from "react";
|
||||
import { FormProvider, useForm } from "react-hook-form";
|
||||
import { Button } from "tw-components";
|
||||
|
||||
export type PermissionFormContext<TContract extends ContractWithRoles> = {
|
||||
type PermissionFormContext<TContract extends ContractWithRoles> = {
|
||||
[role in RolesForContract<TContract>]: string[];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { SettingsMetadata } from "./components/metadata";
|
||||
// import { OnDashboard } from "./components/on-dashboard";
|
||||
// import { PaperCheckoutSetting } from "./components/paper-xyz";
|
||||
import { SettingsPlatformFees } from "./components/platform-fees";
|
||||
import { SettingsPrimarySale } from "./components/primary-sale";
|
||||
import { SettingsRoyalties } from "./components/royalties";
|
||||
@@ -8,21 +6,14 @@ import { Flex, GridItem, SimpleGrid } from "@chakra-ui/react";
|
||||
import { useContract } from "@thirdweb-dev/react";
|
||||
import { extensionDetectedState } from "components/buttons/ExtensionDetectButton";
|
||||
|
||||
// import { isPaperSupportedContract } from "contract-ui/utils";
|
||||
// import { useSingleQueryParam } from "hooks/useQueryParam";
|
||||
|
||||
interface ContractSettingsPageProps {
|
||||
contractAddress?: string;
|
||||
}
|
||||
|
||||
export const ContractSettingsPage: React.FC<
|
||||
ContractSettingsPageProps
|
||||
> = ({ contractAddress }) => {
|
||||
// TODO remove this
|
||||
// const paperEnabled = useSingleQueryParam("paper-enabled");
|
||||
|
||||
export const ContractSettingsPage: React.FC<ContractSettingsPageProps> = ({
|
||||
contractAddress,
|
||||
}) => {
|
||||
const contractQuery = useContract(contractAddress);
|
||||
// const contractType = useContractType(contractAddress);
|
||||
|
||||
const detectedMetadata = extensionDetectedState({
|
||||
contractQuery,
|
||||
@@ -56,19 +47,6 @@ export const ContractSettingsPage: React.FC<
|
||||
detectedState={detectedMetadata}
|
||||
/>
|
||||
</GridItem>
|
||||
|
||||
{/* paper.xyz settings */}
|
||||
{/* {!!paperEnabled &&
|
||||
isPaperSupportedContract(
|
||||
contractQuery.contract,
|
||||
contractType.data,
|
||||
) && (
|
||||
<GridItem order={1}>
|
||||
<PaperCheckoutSetting contract={contractQuery.contract} />
|
||||
</GridItem>
|
||||
)} */}
|
||||
{/* end paper.xyz settings */}
|
||||
|
||||
<GridItem order={detectedPrimarySale === "enabled" ? 2 : 101}>
|
||||
<SettingsPrimarySale
|
||||
contract={contractQuery.contract}
|
||||
|
||||
@@ -33,7 +33,7 @@ type VerifyContractParams = {
|
||||
chainId: number;
|
||||
};
|
||||
|
||||
export async function verifyContract({
|
||||
async function verifyContract({
|
||||
contractAddress,
|
||||
chainId,
|
||||
}: VerifyContractParams) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import { useMemo } from "react";
|
||||
import { Button } from "tw-components";
|
||||
import { Balance } from "../page";
|
||||
|
||||
export interface DistributeButtonProps {
|
||||
interface DistributeButtonProps {
|
||||
contractQuery?: UseContractResult<Split>;
|
||||
balances: Balance[];
|
||||
balancesIsLoading: boolean;
|
||||
|
||||
@@ -40,7 +40,7 @@ export const TokenMintForm: React.FC<TokenMintFormProps> = ({ contract }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const TokenMintFormLayout: React.FC<{
|
||||
const TokenMintFormLayout: React.FC<{
|
||||
mintQuery: UseMutationResult<unknown, unknown, TokenParams>;
|
||||
decimals: number | undefined;
|
||||
address: string | undefined;
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { ExtensionDetectedState } from "components/buttons/ExtensionDetectB
|
||||
import type { ComponentType } from "react";
|
||||
|
||||
// We're using it everywhere.
|
||||
export type PotentialContractInstance =
|
||||
type PotentialContractInstance =
|
||||
| ValidContractInstance
|
||||
| null
|
||||
| undefined;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from "@thirdweb-dev/sdk";
|
||||
import invariant from "tiny-invariant";
|
||||
|
||||
export function isPrebuiltContract(
|
||||
function isPrebuiltContract(
|
||||
contract: ValidContractInstance | null | undefined,
|
||||
contractType: RequiredParam<ContractType> | null,
|
||||
): contract is ValidContractInstance {
|
||||
@@ -21,7 +21,7 @@ export function isPrebuiltContract(
|
||||
return true;
|
||||
}
|
||||
|
||||
export function isPaperSupportedContract(
|
||||
function isPaperSupportedContract(
|
||||
contract: ValidContractInstance | null | undefined,
|
||||
contractType: RequiredParam<ContractType> | null,
|
||||
): contract is EditionDrop | NFTDrop {
|
||||
|
||||
@@ -1,167 +0,0 @@
|
||||
import { NFTDrawerTab } from "./types";
|
||||
import {
|
||||
Flex,
|
||||
GridItem,
|
||||
SimpleGrid,
|
||||
Tab,
|
||||
TabList,
|
||||
TabPanel,
|
||||
TabPanels,
|
||||
Tabs,
|
||||
usePrevious,
|
||||
} from "@chakra-ui/react";
|
||||
import type { NFT } from "@thirdweb-dev/sdk";
|
||||
import { BigNumber } from "ethers";
|
||||
import React from "react";
|
||||
import { Badge, Card, CodeBlock, Drawer, Heading, Text } from "tw-components";
|
||||
import { AddressCopyButton } from "tw-components/AddressCopyButton";
|
||||
import { NFTMediaWithEmptyState } from "tw-components/nft-media";
|
||||
|
||||
interface NFTDrawerProps {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
data: NFT | null;
|
||||
tabs: NFTDrawerTab[];
|
||||
}
|
||||
|
||||
export const NFTDrawer: React.FC<NFTDrawerProps> = ({
|
||||
isOpen,
|
||||
onClose,
|
||||
data,
|
||||
tabs,
|
||||
}) => {
|
||||
const prevData = usePrevious(data);
|
||||
|
||||
const renderData = data || prevData;
|
||||
|
||||
if (!renderData) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const tokenId = renderData.metadata.id;
|
||||
return (
|
||||
<Drawer
|
||||
allowPinchZoom
|
||||
preserveScrollBarGap
|
||||
size="lg"
|
||||
onClose={onClose}
|
||||
isOpen={isOpen}
|
||||
>
|
||||
<Flex py={6} px={2} flexDir="column" gap={6}>
|
||||
<Flex gap={6}>
|
||||
<NFTMediaWithEmptyState
|
||||
metadata={renderData.metadata}
|
||||
requireInteraction
|
||||
width="150px"
|
||||
height="150px"
|
||||
/>
|
||||
<Flex flexDir="column" gap={2} w="70%">
|
||||
<Heading size="title.lg">{renderData.metadata.name}</Heading>
|
||||
<Text size="label.md" noOfLines={6}>
|
||||
{renderData.metadata.description}
|
||||
</Text>
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
||||
<Tabs isLazy lazyBehavior="keepMounted" colorScheme="gray">
|
||||
<TabList
|
||||
px={0}
|
||||
borderBottomColor="borderColor"
|
||||
borderBottomWidth="1px"
|
||||
overflowX={{ base: "auto", md: "inherit" }}
|
||||
>
|
||||
<Tab gap={2}>Details</Tab>
|
||||
{tabs.map((tab) => (
|
||||
<Tab key={tab.title} gap={2} isDisabled={tab.isDisabled}>
|
||||
{tab.title}
|
||||
</Tab>
|
||||
))}
|
||||
</TabList>
|
||||
<TabPanels px={0} py={2}>
|
||||
{/* details tab always exists! */}
|
||||
<TabPanel px={0}>
|
||||
<Flex flexDir="column" gap={4}>
|
||||
<Card as={Flex} flexDir="column" gap={3}>
|
||||
<SimpleGrid rowGap={3} columns={12} placeItems="center left">
|
||||
<GridItem colSpan={3}>
|
||||
<Heading size="label.md">Token ID</Heading>
|
||||
</GridItem>
|
||||
<GridItem colSpan={9}>
|
||||
<AddressCopyButton
|
||||
size="xs"
|
||||
address={tokenId}
|
||||
title="Token ID"
|
||||
/>
|
||||
</GridItem>
|
||||
|
||||
{renderData.type !== "ERC1155" &&
|
||||
BigNumber.from(renderData.supply).lt(2) && (
|
||||
<>
|
||||
<GridItem colSpan={3}>
|
||||
<Heading size="label.md">Owner</Heading>
|
||||
</GridItem>
|
||||
<GridItem colSpan={9}>
|
||||
<AddressCopyButton
|
||||
size="xs"
|
||||
address={renderData.owner}
|
||||
/>
|
||||
</GridItem>
|
||||
</>
|
||||
)}
|
||||
<GridItem colSpan={3}>
|
||||
<Heading size="label.md">Token Standard</Heading>
|
||||
</GridItem>
|
||||
<GridItem colSpan={9}>
|
||||
<Badge size="label.sm" variant="subtle">
|
||||
{renderData.type}
|
||||
</Badge>
|
||||
</GridItem>
|
||||
{renderData.type !== "ERC721" && (
|
||||
<>
|
||||
<GridItem colSpan={3}>
|
||||
<Heading size="label.md">Supply</Heading>
|
||||
</GridItem>
|
||||
<GridItem colSpan={9}>
|
||||
<Text fontFamily="mono" size="body.md">
|
||||
{renderData.supply}
|
||||
</Text>
|
||||
</GridItem>
|
||||
</>
|
||||
)}
|
||||
</SimpleGrid>
|
||||
</Card>
|
||||
{renderData.metadata.attributes ||
|
||||
renderData.metadata.properties ? (
|
||||
<Card as={Flex} flexDir="column" gap={4}>
|
||||
<Heading size="label.md">Properties</Heading>
|
||||
<CodeBlock
|
||||
code={
|
||||
JSON.stringify(
|
||||
renderData.metadata.attributes ||
|
||||
renderData.metadata.properties,
|
||||
null,
|
||||
2,
|
||||
) || ""
|
||||
}
|
||||
language="json"
|
||||
canCopy={false}
|
||||
wrap={false}
|
||||
overflow="auto"
|
||||
/>
|
||||
</Card>
|
||||
) : null}
|
||||
</Flex>
|
||||
</TabPanel>
|
||||
{tabs.map((tab) => {
|
||||
return (
|
||||
<TabPanel key={tab.title} px={0}>
|
||||
{tab.children}
|
||||
</TabPanel>
|
||||
);
|
||||
})}
|
||||
</TabPanels>
|
||||
</Tabs>
|
||||
</Flex>
|
||||
</Drawer>
|
||||
);
|
||||
};
|
||||
@@ -355,7 +355,7 @@ async function getValueAnalytics(
|
||||
}));
|
||||
}
|
||||
|
||||
export function useValueAnalytics(params: AnalyticsQueryParams) {
|
||||
function useValueAnalytics(params: AnalyticsQueryParams) {
|
||||
return useQuery({
|
||||
queryKey: [
|
||||
"analytics",
|
||||
@@ -434,7 +434,7 @@ async function getCumulativeWalletsAnalytics(
|
||||
}));
|
||||
}
|
||||
|
||||
export function useCumulativeWalletsAnalytics(params: AnalyticsQueryParams) {
|
||||
function useCumulativeWalletsAnalytics(params: AnalyticsQueryParams) {
|
||||
return useQuery({
|
||||
queryKey: [
|
||||
"analytics",
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import type { QueryClient } from "@tanstack/react-query";
|
||||
import { publishedContractQuery } from "components/explore/contract-card";
|
||||
|
||||
export type PublishedContractID = `${string}/${string}`;
|
||||
type PublishedContractID = `${string}/${string}`;
|
||||
|
||||
export interface ExploreCategory {
|
||||
id: string;
|
||||
@@ -195,9 +195,9 @@ export function getCategory(id: string): ExploreCategory | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
export type ExploreCategoryName = keyof typeof CATEGORIES;
|
||||
type ExploreCategoryName = keyof typeof CATEGORIES;
|
||||
|
||||
export function isExploreCategory(
|
||||
function isExploreCategory(
|
||||
category: string,
|
||||
): category is ExploreCategoryName {
|
||||
return category in CATEGORIES;
|
||||
|
||||
@@ -4,4 +4,4 @@ fragment ApiSecretKey on api_secret_key {
|
||||
created_at
|
||||
revoked_at
|
||||
hashed_key
|
||||
}
|
||||
}
|
||||
@@ -12,4 +12,4 @@ fragment BaseContract on contract {
|
||||
is_fiat_payout_enabled
|
||||
is_paper_managed
|
||||
is_airdrop
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
fragment Account on account {
|
||||
id
|
||||
created_at
|
||||
seller_id
|
||||
email
|
||||
full_name
|
||||
source
|
||||
role
|
||||
convertkit_subscriber_id
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user