Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button } from "@/components/ui/button";
import { Box, Flex, Select } from "@chakra-ui/react";
import { UploadIcon } from "lucide-react";
import { Button, Text } from "tw-components";
import { useClaimConditionsFormContext } from "..";
import { CustomFormControl } from "../common";

Expand Down Expand Up @@ -115,13 +115,13 @@ export const ClaimerSelection = () => {
>
{/* disable the "Edit" button when form is disabled, but not when it's a "See" button */}
<Button
colorScheme="purple"
isDisabled={disabledSnapshotButton}
borderRadius="md"
variant="primary"
disabled={disabledSnapshotButton}
className="gap-2 rounded-md"
onClick={() => setOpenIndex(phaseIndex)}
rightIcon={<UploadIcon className="size-4" />}
>
{isAdmin ? "Edit" : "See"} Claimer Snapshot
<UploadIcon className="size-4" />
</Button>

<Flex
Expand All @@ -136,14 +136,14 @@ export const ClaimerSelection = () => {
}}
ml={2}
>
<Text size="body.sm" color="inherit">
<p>
●{" "}
<strong>
{field.snapshot?.length} address
{field.snapshot?.length === 1 ? "" : "es"}
</strong>{" "}
in snapshot
</Text>
</p>
</Flex>
</Flex>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { useWalletNFTs } from "@3rdweb-sdk/react";
import type { ThirdwebContract } from "thirdweb";
import { Text } from "tw-components";
import { NFTCards } from "../../_components/NFTCards";

interface NftsOwnedProps {
Expand Down Expand Up @@ -35,8 +34,8 @@ export const NftsOwned: React.FC<NftsOwnedProps> = ({ contract }) => {
trackingCategory="account_nfts_owned"
/>
) : isWalletNFTsLoading ? null : error ? (
<Text>Failed to fetch NFTs for this account: {error}</Text>
<p>Failed to fetch NFTs for this account: {error}</p>
) : (
<Text>This account doesn&apos;t own any NFTs.</Text>
<p>This account doesn&apos;t own any NFTs.</p>
);
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"use client";

import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { Tooltip } from "@chakra-ui/react";
import { TransactionButton } from "components/buttons/TransactionButton";
import type { ThirdwebContract } from "thirdweb";
Expand All @@ -9,7 +11,6 @@ import {
useReadContract,
useSendAndConfirmTransaction,
} from "thirdweb/react";
import { Button, Card, Text } from "tw-components";

interface CreateAccountButtonProps {
contract: ThirdwebContract;
Expand Down Expand Up @@ -51,8 +52,8 @@ export const CreateAccountButton: React.FC<CreateAccountButtonProps> = ({
return (
<Tooltip
label={
<Card py={2} px={4} bgColor="backgroundHighlight">
<Text>You can only initialize one account per EOA.</Text>
<Card className="bg-card px-4 py-2">
<p>You can only initialize one account per EOA.</p>
</Card>
}
bg="transparent"
Expand All @@ -62,7 +63,7 @@ export const CreateAccountButton: React.FC<CreateAccountButtonProps> = ({
placement="right"
shouldWrapChildren
>
<Button colorScheme="primary" isDisabled>
<Button variant="primary" disabled>
Account Created
</Button>
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import { Button } from "@/components/ui/button";
import {
Sheet,
SheetContent,
Expand All @@ -18,7 +19,6 @@ import type { ThirdwebContract } from "thirdweb";
import { multicall } from "thirdweb/extensions/common";
import { balanceOf, encodeSafeTransferFrom } from "thirdweb/extensions/erc1155";
import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react";
import { Button, Text } from "tw-components";
import {
type AirdropAddressInput,
AirdropUpload,
Expand Down Expand Up @@ -118,12 +118,8 @@ const AirdropTab: React.FC<AirdropTabProps> = ({ contract, tokenId }) => {
<Flex direction={{ base: "column", md: "row" }} gap={4}>
<Sheet open={open} onOpenChange={setOpen}>
<SheetTrigger asChild>
<Button
colorScheme="primary"
borderRadius="md"
rightIcon={<UploadIcon className="size-5" />}
>
Upload addresses
<Button variant="primary" className="rounded-md">
Upload addresses <UploadIcon className="mr-2 size-5" />
</Button>
</SheetTrigger>
<SheetContent className="w-full overflow-y-auto sm:min-w-[540px] lg:min-w-[700px]">
Expand All @@ -149,18 +145,18 @@ const AirdropTab: React.FC<AirdropTabProps> = ({ contract, tokenId }) => {
color={addresses.length === 0 ? "orange.500" : "green.500"}
>
{addresses.length > 0 && (
<Text size="body.sm" color="inherit">
<p>
<strong>{addresses.length} addresses</strong> ready to be
airdropped
</Text>
</p>
)}
</Flex>
</Flex>
</div>
<Text>
<p>
You can airdrop to a maximum of 250 addresses at a time. If you have
more, please do it in multiple transactions.
</Text>
</p>
<TransactionButton
txChainID={contract.chain.id}
transactionCount={1}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ import type { ThirdwebContract } from "thirdweb";
import { getNFT as getErc721NFT } from "thirdweb/extensions/erc721";
import { getNFT as getErc1155NFT } from "thirdweb/extensions/erc1155";
import { useReadContract } from "thirdweb/react";
import {} from "tw-components";
import { Button, Card, Heading, Text } from "tw-components";
import { Button, Card } from "tw-components";
import { NFTMediaWithEmptyState } from "tw-components/nft-media";
import { shortenString } from "utils/usedapp-external";
import { NftProperty } from "../components/nft-property";
Expand Down Expand Up @@ -104,10 +103,10 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({

if (!nft) {
return (
<Text>
<p>
No NFT found with token ID {tokenId}. Please check the token ID and try
again.
</Text>
</p>
);
}

Expand Down Expand Up @@ -182,7 +181,7 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
label={
tb.isDisabled ? (
<Card py={2} px={4} bgColor="backgroundHighlight">
<Text size="label.sm">{tb.disabledText}</Text>
<p>{tb.disabledText}</p>
</Card>
) : (
""
Expand Down Expand Up @@ -214,7 +213,7 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
<Card as={Flex} flexDir="column" gap={3}>
<SimpleGrid rowGap={3} columns={12} placeItems="center left">
<GridItem colSpan={4}>
<Heading size="label.md">Token ID</Heading>
<p className="font-semibold">Token ID</p>
</GridItem>
<GridItem colSpan={8}>
<CopyTextButton
Expand All @@ -228,31 +227,29 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
{nft.owner && (
<>
<GridItem colSpan={4}>
<Heading size="label.md">Owner</Heading>
<p className="font-semibold">Owner</p>
</GridItem>
<GridItem colSpan={8}>
<WalletAddress address={nft.owner} />
</GridItem>
</>
)}
<GridItem colSpan={4}>
<Heading size="label.md">Token Standard</Heading>
<p className="font-semibold">Token Standard</p>
</GridItem>
<GridItem colSpan={8}>{nft.type}</GridItem>
{nft.type !== "ERC721" && (
<>
<GridItem colSpan={4}>
<Heading size="label.md">Supply</Heading>
<p className="font-semibold">Supply</p>
</GridItem>
<GridItem colSpan={8}>
<Text fontFamily="mono" size="body.md">
{nft.supply.toString()}
</Text>
<p>{nft.supply.toLocaleString("en-US")}</p>
</GridItem>
</>
)}
<GridItem colSpan={4}>
<Heading size="label.md">Token URI</Heading>
<p className="font-semibold">Token URI</p>
</GridItem>
<GridItem
colSpan={8}
Expand All @@ -275,7 +272,7 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
{nft.metadata.image && (
<>
<GridItem colSpan={4}>
<Heading size="label.md">Media URI</Heading>
<p className="font-semibold">Media URI</p>
</GridItem>
<GridItem
colSpan={8}
Expand All @@ -301,7 +298,7 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
</Card>
{properties ? (
<Card as={Flex} flexDir="column" gap={4}>
<Heading size="label.md">Attributes</Heading>
<p className="font-semibold">Attributes</p>
{Array.isArray(properties) &&
String(properties[0]?.value) !== "undefined" ? (
<SimpleGrid columns={{ base: 2, md: 4 }} gap={2}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
useEngineSystemHealth,
useEngineSystemMetrics,
} from "@3rdweb-sdk/react/hooks/useEngine";
import { Text } from "tw-components";

interface EngineSystemProps {
instance: EngineInstance;
Expand All @@ -17,14 +16,14 @@ export const EngineSystem: React.FC<EngineSystemProps> = ({ instance }) => {
}

return (
<Text fontSize="x-small" fontFamily="mono" opacity={0.5} gap={0}>
<p className="gap-0 font-mono text-xs opacity-50">
Version: {healthQuery.data.engineVersion ?? "..."}
<br />
Enabled: {healthQuery.data.features?.join(", ")}
<br />
CPU: {metricsQuery.data?.data?.cpu?.toFixed(2) ?? "..."}%
<br />
Memory: {metricsQuery.data?.data?.memory?.toFixed(0) ?? "..."}MB
</Text>
</p>
);
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"use client";

import {} from "@/components/ui/dropdown-menu";
import {} from "@/components/ui/select";
import { Layers3 } from "lucide-react";
import Link from "next/link";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
AccordionPanel,
} from "@chakra-ui/react";
import type { Abi } from "abitype";
import { Heading } from "tw-components";
import type { SourceFile } from "../types";

interface SourcesAccordionProps {
Expand All @@ -33,7 +32,7 @@ export const SourcesAccordion: React.FC<SourcesAccordionProps> = ({
{({ isExpanded }) => (
<>
<AccordionButton justifyContent="space-between" py={2}>
<Heading size="label.md">ABI</Heading>
<p className="font-semibold">ABI</p>
<AccordionIcon />
</AccordionButton>
<AccordionPanel>
Expand All @@ -58,7 +57,7 @@ export const SourcesAccordion: React.FC<SourcesAccordionProps> = ({
{({ isExpanded }) => (
<>
<AccordionButton justifyContent="space-between" py={2}>
<Heading size="label.md">{signature.filename}</Heading>
<p className="font-semibold">{signature.filename}</p>
<AccordionIcon />
</AccordionButton>
<AccordionPanel>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Flex } from "@chakra-ui/react";
import { ChakraNextImage } from "components/Image";
import type { StaticImageData } from "next/image";
import { Text } from "tw-components";
import type { ComponentWithChildren } from "types/component-with-children";

interface AmbassadorProps {
Expand Down Expand Up @@ -41,7 +40,7 @@ export const AmbassadorCard: ComponentWithChildren<AmbassadorProps> = ({
lineHeight={1.6}
textAlign="center"
>
<Text size="body.lg">{children}</Text>
<p>{children}</p>
</Flex>
</Flex>
);
Expand Down
9 changes: 4 additions & 5 deletions apps/dashboard/src/core-ui/batch-upload/batch-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
import { useMemo } from "react";
import { type Column, usePagination, useTable } from "react-table";
import type { NFTInput } from "thirdweb/utils";
import { Text } from "tw-components";

const FileImage: React.FC<ImageProps> = ({ src, ...props }) => {
const img = useImageFileOrUrl(
Expand Down Expand Up @@ -174,9 +173,9 @@ export const BatchTable: React.FC<BatchTableProps> = ({
{headerGroup.headers.map((column, i) => (
// biome-ignore lint/suspicious/noArrayIndexKey: FIXME
<Th {...column.getHeaderProps()} border="none" key={i}>
<Text as="label" size="label.sm" color="faded">
<p className="text-muted-foreground">
{column.render("Header")}
</Text>
</p>
</Th>
))}
</Tr>
Expand Down Expand Up @@ -227,10 +226,10 @@ export const BatchTable: React.FC<BatchTableProps> = ({
icon={<ChevronLeftIcon className="size-4" />}
onClick={() => previousPage()}
/>
<Text whiteSpace="nowrap">
<p className="whitespace-nowrap">
Page <strong>{pageIndex + 1}</strong> of{" "}
<strong>{pageOptions.length}</strong>
</Text>
</p>
<IconButton
isDisabled={!canNextPage}
aria-label="next page"
Expand Down
12 changes: 2 additions & 10 deletions apps/dashboard/src/pages/mission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import ReasonSection from "components/mission/ReasonSection";
import ReasonWeb3Section from "components/mission/ReasonWeb3Section";
import { getAbsoluteUrl } from "lib/vercel-utils";
import { PageId } from "page-id";
import { Text } from "tw-components";
import type { ThirdwebNextPage } from "utils/types";

const TRACKING_CATEGORY = "mission";
Expand Down Expand Up @@ -108,16 +107,9 @@ const Mission: ThirdwebNextPage = () => {
maxW="80%"
/>

<Text
size="body.xl"
fontWeight={600}
textAlign="center"
mt={{ base: "28px", md: "32px" }}
color="#fff"
fontSize={{ base: "20px", md: "32px" }}
>
<p className="mt-7 text-center font-semibold text-[28px] text-white md:mt-8 md:text-[32px]">
solves for both.
</Text>
</p>
</Box>
</Container>
</Container>
Expand Down
Loading
Loading