Skip to content

Commit 9bfe509

Browse files
committed
reorg
1 parent 293d0c4 commit 9bfe509

File tree

22 files changed

+52
-61
lines changed

22 files changed

+52
-61
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/cards.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function Cards(props: {
3333
<CardLink
3434
title="Create Coin"
3535
description="Launch your own ERC-20 coin"
36-
href={`/team/${props.teamSlug}/${props.projectSlug}/assets/create`}
36+
href={`/team/${props.teamSlug}/${props.projectSlug}/assets/create/token`}
3737
icon={CoinsIcon}
3838
trackingLabel="create-token"
3939
/>

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/_common/step-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Button } from "@/components/ui/button";
22
import { useTrack } from "hooks/analytics/useTrack";
33
import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react";
4-
import { getStepCardTrackingData } from "../tracking";
4+
import { getStepCardTrackingData } from "../token/_common/tracking";
55

66
export function StepCard(props: {
77
title: string;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { UseFormReturn } from "react-hook-form";
22
import * as z from "zod";
3-
import { socialUrlsSchema } from "../_common/schema";
4-
import type { NFTMetadataWithPrice } from "./upload-nfts/batch-upload/process-files";
3+
import { socialUrlsSchema } from "../../_common/schema";
4+
import type { NFTMetadataWithPrice } from "../upload-nfts/batch-upload/process-files";
55

66
export const nftCollectionInfoFormSchema = z.object({
77
// info fieldset
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import { Textarea } from "@/components/ui/textarea";
88
import { ClientOnly } from "components/ClientOnly/ClientOnly";
99
import { FileInput } from "components/shared/FileInput";
1010
import type { ThirdwebClient } from "thirdweb";
11-
import { SocialUrlsFieldset } from "../_common/SocialUrls";
12-
import { StepCard } from "../_common/step-card";
13-
import type { NFTCollectionInfoForm } from "./form";
11+
import { SocialUrlsFieldset } from "../../_common/SocialUrls";
12+
import { StepCard } from "../../_common/step-card";
13+
import type { NFTCollectionInfoForm } from "../_common/form";
1414

1515
export function NFTCollectionInfoFieldset(props: {
1616
client: ThirdwebClient;

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/create-nft-page-ui.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import {
1212
type CreateNFTFunctions,
1313
type NFTCollectionInfoFormValues,
1414
nftCollectionInfoFormSchema,
15-
} from "./form";
16-
import { LaunchNFT } from "./launch-nft";
17-
import { NFTCollectionInfoFieldset } from "./nft-collection-info-fieldset";
15+
} from "./_common/form";
16+
import { NFTCollectionInfoFieldset } from "./collection-info/nft-collection-info-fieldset";
17+
import { LaunchNFT } from "./launch/launch-nft";
1818
import type {} from "./upload-nfts/batch-upload/process-files";
1919
import { type NFTData, UploadNFTsFieldset } from "./upload-nfts/upload-nfts";
2020

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/create-nft-page.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ import { useActiveAccount } from "thirdweb/react";
2424
import { maxUint256 } from "thirdweb/utils";
2525
import { parseError } from "utils/errorParser";
2626
import { useAddContractToProject } from "../../../hooks/project-contracts";
27-
import { CreateNFTPageUI } from "./create-nft-page-ui";
28-
import type { CreateNFTFormValues, NFTCollectionInfoFormValues } from "./form";
27+
import type {
28+
CreateNFTFormValues,
29+
NFTCollectionInfoFormValues,
30+
} from "./_common/form";
2931
import {
3032
getNFTDeploymentTrackingData,
3133
getNFTStepTrackingData,
32-
} from "./tracking";
34+
} from "./_common/tracking";
35+
import { CreateNFTPageUI } from "./create-nft-page-ui";
3336
import type { NFTMetadataWithPrice } from "./upload-nfts/batch-upload/process-files";
3437

3538
export function CreateNFTPage(props: {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import { useMemo, useRef, useState } from "react";
2424
import { type ThirdwebClient, defineChain } from "thirdweb";
2525
import { TokenProvider, TokenSymbol, useActiveWallet } from "thirdweb/react";
2626
import { parseError } from "utils/errorParser";
27-
import { ChainOverview } from "../_common/chain-overview";
28-
import { FilePreview } from "../_common/file-preview";
29-
import { StepCard } from "../_common/step-card";
30-
import type { CreateNFTFormValues, CreateNFTFunctions } from "./form";
31-
import { getNFTLaunchTrackingData } from "./tracking";
27+
import { ChainOverview } from "../../_common/chain-overview";
28+
import { FilePreview } from "../../_common/file-preview";
29+
import { StepCard } from "../../_common/step-card";
30+
import type { CreateNFTFormValues, CreateNFTFunctions } from "../_common/form";
31+
import { getNFTLaunchTrackingData } from "../_common/tracking";
3232

3333
const stepIds = {
3434
"deploy-contract": "deploy-contract",

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default async function Page(props: {
2525

2626
if (!authToken || !accountAddress) {
2727
loginRedirect(
28-
`/team/${params.team_slug}/${params.project_slug}/assets/create`,
28+
`/team/${params.team_slug}/${params.project_slug}/assets/create/nft`,
2929
);
3030
}
3131

@@ -45,7 +45,7 @@ export default async function Page(props: {
4545
return (
4646
<div className="flex grow flex-col">
4747
<CreateAssetPageHeader
48-
title="Create NFT"
48+
title="Create NFT Collection"
4949
description="Launch an NFT collection for your project"
5050
teamSlug={params.team_slug}
5151
projectSlug={params.project_slug}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/upload-nfts/schema.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,9 @@ export const nftWithPriceSchema = z.object({
3737
background_color: z
3838
.string()
3939
.optional()
40-
.refine(
41-
(val) => {
42-
if (!val) {
43-
return true;
44-
}
45-
return val.startsWith("#") && val.length === 7;
46-
},
47-
{
48-
message:
49-
"Background color must be a six-character hexadecimal with a pre-pended #",
50-
},
51-
),
40+
.refine((val) => !val || /^#[0-9A-Fa-f]{6}$/.test(val), {
41+
message: "Must be a valid hex color (e.g., #FF0000)",
42+
}),
5243
price_amount: priceAmountSchema,
5344
price_currency: z.string().refine((value) => {
5445
if (!value) {

0 commit comments

Comments
 (0)