Skip to content

Commit 495fd8c

Browse files
committed
address comments
1 parent 024a45c commit 495fd8c

File tree

10 files changed

+33
-24
lines changed

10 files changed

+33
-24
lines changed

apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import { getAuthToken } from "@app/api/lib/getAuthToken";
12
import { ArrowUpRightIcon } from "lucide-react";
23
import type { Metadata } from "next";
34
import { headers } from "next/headers";
4-
import { getAuthToken } from "../../../api/lib/getAuthToken";
55
import { SearchInput } from "./components/client/search";
66
import { QueryType } from "./components/client/type";
77
import { RouteListView } from "./components/client/view";

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ import {
1414
DropdownMenuTrigger,
1515
} from "@/components/ui/dropdown-menu";
1616
import { getClientThirdwebClient } from "@/constants/thirdweb-client.client";
17+
import {
18+
getAuthToken,
19+
getAuthTokenWalletAddress,
20+
} from "@app/api/lib/getAuthToken";
1721
import { ChevronDownIcon, TicketCheckIcon } from "lucide-react";
1822
import type { Metadata } from "next";
1923
import Link from "next/link";
2024
import { redirect } from "next/navigation";
2125
import { mapV4ChainToV5Chain } from "../../../../../../contexts/map-chains";
2226
import { NebulaChatButton } from "../../../../../nebula-app/(app)/components/FloatingChat/FloatingChat";
23-
import {
24-
getAuthToken,
25-
getAuthTokenWalletAddress,
26-
} from "../../../../api/lib/getAuthToken";
2727
import { TeamHeader } from "../../../../team/components/TeamHeader/team-header";
2828
import { StarButton } from "../../components/client/star-button";
2929
import { getChain, getChainMetadata } from "../../utils";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { getAuthToken } from "@app/api/lib/getAuthToken";
12
import type { Metadata } from "next";
2-
import { getAuthToken } from "../../../../api/lib/getAuthToken";
33
import {
44
SharedContractLayout,
55
generateContractLayoutMetadata,

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/nft/handleNFTMediaUpload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function handleNFTMediaUpload<T extends MinimalNFTMetadata>(params: {
2828
form.setValue("animation_url", undefined);
2929
}
3030
} else if (
31-
["audio", "video", "text/html", "model/*"].some((type: string) =>
31+
["audio", "video", "text/html", "model/"].some((type: string) =>
3232
file.type.includes(type),
3333
) ||
3434
file.name?.endsWith(".glb") ||

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/_common/tracking.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,10 @@ export function getNFTDeploymentTrackingData(
8282
: "deployer.thirdweb.eth/DropERC1155",
8383
chainId: params.chainId,
8484
deploymentType: "asset",
85+
...(params.type === "error"
86+
? {
87+
errorMessage: params.errorMessage,
88+
}
89+
: {}),
8590
};
8691
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function CreateNFTPage(props: {
4848
const addContractToProject = useAddContractToProject();
4949
const contractAddressRef = useRef<string | undefined>(undefined);
5050

51-
function getContractInfo(params: {
51+
function getContractAndAccount(params: {
5252
chain: string;
5353
}) {
5454
if (!activeAccount) {
@@ -211,7 +211,7 @@ export function CreateNFTPage(props: {
211211
}) {
212212
const { formValues, ercType } = params;
213213

214-
const { contract, activeAccount } = getContractInfo({
214+
const { contract, activeAccount } = getContractAndAccount({
215215
chain: formValues.collectionInfo.chain,
216216
});
217217

@@ -268,7 +268,7 @@ export function CreateNFTPage(props: {
268268
formValues: CreateNFTCollectionAllValues;
269269
}) {
270270
const { formValues } = params;
271-
const { contract, activeAccount } = getContractInfo({
271+
const { contract, activeAccount } = getContractAndAccount({
272272
chain: formValues.collectionInfo.chain,
273273
});
274274

@@ -340,7 +340,7 @@ export function CreateNFTPage(props: {
340340
nftBatch: NFTMetadataWithPrice[];
341341
}) {
342342
const { nftCollectionInfo, nftBatch } = params;
343-
const { contract, activeAccount } = getContractInfo({
343+
const { contract, activeAccount } = getContractAndAccount({
344344
chain: nftCollectionInfo.chain,
345345
});
346346

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { getProject } from "@/api/projects";
22
import { getTeamBySlug } from "@/api/team";
33

44
import { getClientThirdwebClient } from "@/constants/thirdweb-client.client";
5-
import { redirect } from "next/navigation";
65
import {
76
getAuthToken,
87
getAuthTokenWalletAddress,
9-
} from "../../../../../../../api/lib/getAuthToken";
10-
import { loginRedirect } from "../../../../../../../login/loginRedirect";
8+
} from "@app/api/lib/getAuthToken";
9+
import { loginRedirect } from "@app/login/loginRedirect";
10+
import { redirect } from "next/navigation";
1111
import { CreateAssetPageHeader } from "../_common/PageHeader";
1212
import { CreateNFTPage } from "./create-nft-page";
1313

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,17 @@ export const nftWithPriceSchema = z.object({
4141
message: "Must be a valid hex color (e.g., #FF0000)",
4242
}),
4343
price_amount: priceAmountSchema,
44-
price_currency: z.string().refine((value) => {
45-
if (!value) {
46-
return true;
47-
}
48-
return isAddress(value);
49-
}),
44+
price_currency: z.string().refine(
45+
(value) => {
46+
if (!value) {
47+
return true;
48+
}
49+
return isAddress(value);
50+
},
51+
{
52+
message: "Must be a valid token contract address",
53+
},
54+
),
5055
supply: supplySchema,
5156
attributes: z
5257
.array(z.object({ trait_type: z.string(), value: z.string() }))

apps/dashboard/src/components/shared/FileInput.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/* eslint-disable @next/next/no-img-element */
21
import { Button } from "@/components/ui/button";
32
import { cn } from "@/lib/utils";
3+
import { FilePreview } from "@app/team/[team_slug]/[project_slug]/(sidebar)/assets/create/_common/file-preview";
44
import { FilePlusIcon, UploadIcon } from "lucide-react";
55
import { useCallback, useEffect, useRef } from "react";
66
import {
@@ -10,8 +10,6 @@ import {
1010
useDropzone,
1111
} from "react-dropzone";
1212
import type { ThirdwebClient } from "thirdweb";
13-
// import { MediaRenderer } from "thirdweb/react";
14-
import { FilePreview } from "../../app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/_common/file-preview";
1513

1614
interface IFileInputProps {
1715
accept?: Accept;

apps/dashboard/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"noUncheckedIndexedAccess": true,
2020
"paths": {
2121
"tw-components": ["tw-components"],
22-
"tw-components/*": ["tw-components/*"]
22+
"tw-components/*": ["tw-components/*"],
23+
"@app/*": ["app/(app)/*"]
2324
},
2425
"plugins": [
2526
{

0 commit comments

Comments
 (0)