From 5fc6667ab130be2ed12ef7115661dab6e2bec5f2 Mon Sep 17 00:00:00 2001 From: kwiss Date: Fri, 19 Apr 2024 12:37:40 +0200 Subject: [PATCH 1/2] chore(app): update app organisation --- .../[token_id]/components/asset-infos.tsx | 0 .../[token_id]/components/asset.tsx | 0 .../[token_id]/components/cancel-listing.tsx | 0 .../[token_id]/components/create-listing.tsx | 0 .../[token_id]/components/create-offer.tsx | 0 .../[token_id]/components/fulfill-listing.tsx | 0 .../[token_id]/components/fulfill-offer.tsx | 0 .../[token_id]/components/token-activity.tsx | 0 .../[token_id]/components/token-offers.tsx | 0 .../[contract_address]/[token_id]/data.ts | 0 .../[contract_address]/[token_id]/page.tsx | 0 .../{src => }/app/(authenticated)/layout.tsx | 0 .../portfolio/components/Portfolio.tsx | 0 .../app/(authenticated)/portfolio/page.tsx | 0 .../components/collection.tsx | 0 .../components/columns.tsx | 0 .../components/data-table-column-header.tsx | 0 .../components/data-table-faceted-filter.tsx | 0 .../components/data-table-pagination.tsx | 0 .../components/data-table-toolbar.tsx | 0 .../components/data-table.tsx | 0 .../collection/[collectionAddress]/page.tsx | 0 .../queries/fetchCollection.ts | 0 .../queries/fetchCollectionMarket.ts | 0 .../[collectionAddress]/utils/index.ts | 0 .../{src => }/app/collections/page.tsx | 0 apps/arkmarket/{src => }/app/layout.tsx | 0 apps/arkmarket/app/page.tsx | 58 ++++ .../{src => }/components/auth-switcher.tsx | 0 .../{src => }/components/authentication.tsx | 0 .../arkmarket/{src => }/components/header.tsx | 0 apps/arkmarket/components/icons.tsx | 24 ++ .../{src => }/components/main-nav.tsx | 9 + apps/arkmarket/{src => }/components/media.tsx | 0 .../{src => }/components/providers.tsx | 0 .../components/starknet-provider.tsx | 0 .../{src => }/components/user-nav.tsx | 0 apps/arkmarket/config/site.ts | 13 + apps/arkmarket/{src => }/env.ts | 0 apps/arkmarket/next.config.js | 2 +- apps/arkmarket/public/logo.svg | 4 + apps/arkmarket/src/app/page.tsx | 35 --- apps/arkmarket/tailwind.config.ts | 3 +- apps/arkmarket/tsconfig.json | 2 +- apps/arkmarket/{src => }/types/index.ts | 0 apps/arkmarket/{src => }/types/schema.ts | 0 packages/ui/components.json | 5 +- packages/ui/package.json | 5 +- .../ui/src/components/{ui => }/accordion.tsx | 0 .../ui/src/components/{ui => }/avatar.tsx | 0 packages/ui/src/components/{ui => }/badge.tsx | 0 .../ui/src/components/{ui => }/button.tsx | 39 ++- packages/ui/src/components/{ui => }/card.tsx | 0 packages/ui/src/components/carousel.tsx | 262 ++++++++++++++++++ .../ui/src/components/{ui => }/command.tsx | 0 .../ui/src/components/{ui => }/dialog.tsx | 0 .../src/components/{ui => }/dropdown-menu.tsx | 0 packages/ui/src/components/{ui => }/form.tsx | 0 packages/ui/src/components/{ui => }/input.tsx | 0 packages/ui/src/components/{ui => }/label.tsx | 0 .../ui/src/components/{ui => }/popover.tsx | 0 .../src/components/{ui => }/scroll-area.tsx | 0 .../ui/src/components/{ui => }/select.tsx | 0 .../ui/src/components/{ui => }/separator.tsx | 0 packages/ui/src/components/{ui => }/table.tsx | 0 packages/ui/src/components/{ui => }/theme.tsx | 0 packages/ui/src/components/{ui => }/toast.tsx | 0 .../ui/src/components/{ui => }/tooltip.tsx | 0 pnpm-lock.yaml | 25 ++ tooling/tailwind/base.ts | 2 +- 70 files changed, 425 insertions(+), 63 deletions(-) rename apps/arkmarket/{src => }/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset-infos.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/assets/[contract_address]/[token_id]/components/cancel-listing.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-listing.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-offer.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-listing.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-offer.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-activity.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-offers.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/assets/[contract_address]/[token_id]/data.ts (100%) rename apps/arkmarket/{src => }/app/(authenticated)/assets/[contract_address]/[token_id]/page.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/layout.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/portfolio/components/Portfolio.tsx (100%) rename apps/arkmarket/{src => }/app/(authenticated)/portfolio/page.tsx (100%) rename apps/arkmarket/{src => }/app/collection/[collectionAddress]/components/collection.tsx (100%) rename apps/arkmarket/{src => }/app/collection/[collectionAddress]/components/columns.tsx (100%) rename apps/arkmarket/{src => }/app/collection/[collectionAddress]/components/data-table-column-header.tsx (100%) rename apps/arkmarket/{src => }/app/collection/[collectionAddress]/components/data-table-faceted-filter.tsx (100%) rename apps/arkmarket/{src => }/app/collection/[collectionAddress]/components/data-table-pagination.tsx (100%) rename apps/arkmarket/{src => }/app/collection/[collectionAddress]/components/data-table-toolbar.tsx (100%) rename apps/arkmarket/{src => }/app/collection/[collectionAddress]/components/data-table.tsx (100%) rename apps/arkmarket/{src => }/app/collection/[collectionAddress]/page.tsx (100%) rename apps/arkmarket/{src => }/app/collection/[collectionAddress]/queries/fetchCollection.ts (100%) rename apps/arkmarket/{src => }/app/collection/[collectionAddress]/queries/fetchCollectionMarket.ts (100%) rename apps/arkmarket/{src => }/app/collection/[collectionAddress]/utils/index.ts (100%) rename apps/arkmarket/{src => }/app/collections/page.tsx (100%) rename apps/arkmarket/{src => }/app/layout.tsx (100%) create mode 100644 apps/arkmarket/app/page.tsx rename apps/arkmarket/{src => }/components/auth-switcher.tsx (100%) rename apps/arkmarket/{src => }/components/authentication.tsx (100%) rename apps/arkmarket/{src => }/components/header.tsx (100%) create mode 100644 apps/arkmarket/components/icons.tsx rename apps/arkmarket/{src => }/components/main-nav.tsx (77%) rename apps/arkmarket/{src => }/components/media.tsx (100%) rename apps/arkmarket/{src => }/components/providers.tsx (100%) rename apps/arkmarket/{src => }/components/starknet-provider.tsx (100%) rename apps/arkmarket/{src => }/components/user-nav.tsx (100%) create mode 100644 apps/arkmarket/config/site.ts rename apps/arkmarket/{src => }/env.ts (100%) create mode 100644 apps/arkmarket/public/logo.svg delete mode 100644 apps/arkmarket/src/app/page.tsx rename apps/arkmarket/{src => }/types/index.ts (100%) rename apps/arkmarket/{src => }/types/schema.ts (100%) rename packages/ui/src/components/{ui => }/accordion.tsx (100%) rename packages/ui/src/components/{ui => }/avatar.tsx (100%) rename packages/ui/src/components/{ui => }/badge.tsx (100%) rename packages/ui/src/components/{ui => }/button.tsx (72%) rename packages/ui/src/components/{ui => }/card.tsx (100%) create mode 100644 packages/ui/src/components/carousel.tsx rename packages/ui/src/components/{ui => }/command.tsx (100%) rename packages/ui/src/components/{ui => }/dialog.tsx (100%) rename packages/ui/src/components/{ui => }/dropdown-menu.tsx (100%) rename packages/ui/src/components/{ui => }/form.tsx (100%) rename packages/ui/src/components/{ui => }/input.tsx (100%) rename packages/ui/src/components/{ui => }/label.tsx (100%) rename packages/ui/src/components/{ui => }/popover.tsx (100%) rename packages/ui/src/components/{ui => }/scroll-area.tsx (100%) rename packages/ui/src/components/{ui => }/select.tsx (100%) rename packages/ui/src/components/{ui => }/separator.tsx (100%) rename packages/ui/src/components/{ui => }/table.tsx (100%) rename packages/ui/src/components/{ui => }/theme.tsx (100%) rename packages/ui/src/components/{ui => }/toast.tsx (100%) rename packages/ui/src/components/{ui => }/tooltip.tsx (100%) diff --git a/apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset-infos.tsx b/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset-infos.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset-infos.tsx rename to apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset-infos.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset.tsx b/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset.tsx rename to apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/cancel-listing.tsx b/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/cancel-listing.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/cancel-listing.tsx rename to apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/cancel-listing.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-listing.tsx b/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-listing.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-listing.tsx rename to apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-listing.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-offer.tsx b/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-offer.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-offer.tsx rename to apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-offer.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-listing.tsx b/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-listing.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-listing.tsx rename to apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-listing.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-offer.tsx b/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-offer.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-offer.tsx rename to apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-offer.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-activity.tsx b/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-activity.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-activity.tsx rename to apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-activity.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-offers.tsx b/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-offers.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-offers.tsx rename to apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-offers.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/data.ts b/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/data.ts similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/data.ts rename to apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/data.ts diff --git a/apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/page.tsx b/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/page.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/assets/[contract_address]/[token_id]/page.tsx rename to apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/page.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/layout.tsx b/apps/arkmarket/app/(authenticated)/layout.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/layout.tsx rename to apps/arkmarket/app/(authenticated)/layout.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/portfolio/components/Portfolio.tsx b/apps/arkmarket/app/(authenticated)/portfolio/components/Portfolio.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/portfolio/components/Portfolio.tsx rename to apps/arkmarket/app/(authenticated)/portfolio/components/Portfolio.tsx diff --git a/apps/arkmarket/src/app/(authenticated)/portfolio/page.tsx b/apps/arkmarket/app/(authenticated)/portfolio/page.tsx similarity index 100% rename from apps/arkmarket/src/app/(authenticated)/portfolio/page.tsx rename to apps/arkmarket/app/(authenticated)/portfolio/page.tsx diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection.tsx b/apps/arkmarket/app/collection/[collectionAddress]/components/collection.tsx similarity index 100% rename from apps/arkmarket/src/app/collection/[collectionAddress]/components/collection.tsx rename to apps/arkmarket/app/collection/[collectionAddress]/components/collection.tsx diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/columns.tsx b/apps/arkmarket/app/collection/[collectionAddress]/components/columns.tsx similarity index 100% rename from apps/arkmarket/src/app/collection/[collectionAddress]/components/columns.tsx rename to apps/arkmarket/app/collection/[collectionAddress]/components/columns.tsx diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/data-table-column-header.tsx b/apps/arkmarket/app/collection/[collectionAddress]/components/data-table-column-header.tsx similarity index 100% rename from apps/arkmarket/src/app/collection/[collectionAddress]/components/data-table-column-header.tsx rename to apps/arkmarket/app/collection/[collectionAddress]/components/data-table-column-header.tsx diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/data-table-faceted-filter.tsx b/apps/arkmarket/app/collection/[collectionAddress]/components/data-table-faceted-filter.tsx similarity index 100% rename from apps/arkmarket/src/app/collection/[collectionAddress]/components/data-table-faceted-filter.tsx rename to apps/arkmarket/app/collection/[collectionAddress]/components/data-table-faceted-filter.tsx diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/data-table-pagination.tsx b/apps/arkmarket/app/collection/[collectionAddress]/components/data-table-pagination.tsx similarity index 100% rename from apps/arkmarket/src/app/collection/[collectionAddress]/components/data-table-pagination.tsx rename to apps/arkmarket/app/collection/[collectionAddress]/components/data-table-pagination.tsx diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/data-table-toolbar.tsx b/apps/arkmarket/app/collection/[collectionAddress]/components/data-table-toolbar.tsx similarity index 100% rename from apps/arkmarket/src/app/collection/[collectionAddress]/components/data-table-toolbar.tsx rename to apps/arkmarket/app/collection/[collectionAddress]/components/data-table-toolbar.tsx diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/data-table.tsx b/apps/arkmarket/app/collection/[collectionAddress]/components/data-table.tsx similarity index 100% rename from apps/arkmarket/src/app/collection/[collectionAddress]/components/data-table.tsx rename to apps/arkmarket/app/collection/[collectionAddress]/components/data-table.tsx diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/page.tsx b/apps/arkmarket/app/collection/[collectionAddress]/page.tsx similarity index 100% rename from apps/arkmarket/src/app/collection/[collectionAddress]/page.tsx rename to apps/arkmarket/app/collection/[collectionAddress]/page.tsx diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/queries/fetchCollection.ts b/apps/arkmarket/app/collection/[collectionAddress]/queries/fetchCollection.ts similarity index 100% rename from apps/arkmarket/src/app/collection/[collectionAddress]/queries/fetchCollection.ts rename to apps/arkmarket/app/collection/[collectionAddress]/queries/fetchCollection.ts diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/queries/fetchCollectionMarket.ts b/apps/arkmarket/app/collection/[collectionAddress]/queries/fetchCollectionMarket.ts similarity index 100% rename from apps/arkmarket/src/app/collection/[collectionAddress]/queries/fetchCollectionMarket.ts rename to apps/arkmarket/app/collection/[collectionAddress]/queries/fetchCollectionMarket.ts diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/utils/index.ts b/apps/arkmarket/app/collection/[collectionAddress]/utils/index.ts similarity index 100% rename from apps/arkmarket/src/app/collection/[collectionAddress]/utils/index.ts rename to apps/arkmarket/app/collection/[collectionAddress]/utils/index.ts diff --git a/apps/arkmarket/src/app/collections/page.tsx b/apps/arkmarket/app/collections/page.tsx similarity index 100% rename from apps/arkmarket/src/app/collections/page.tsx rename to apps/arkmarket/app/collections/page.tsx diff --git a/apps/arkmarket/src/app/layout.tsx b/apps/arkmarket/app/layout.tsx similarity index 100% rename from apps/arkmarket/src/app/layout.tsx rename to apps/arkmarket/app/layout.tsx diff --git a/apps/arkmarket/app/page.tsx b/apps/arkmarket/app/page.tsx new file mode 100644 index 0000000..97f763b --- /dev/null +++ b/apps/arkmarket/app/page.tsx @@ -0,0 +1,58 @@ +import Link from "next/link"; + +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@ark-market/ui/components/card"; +import { + Carousel, + CarouselContent, + CarouselItem, + CarouselNext, + CarouselPrevious, +} from "@ark-market/ui/components/carousel"; + +export default async function HomePage() { + return ( +
+
+ + + {Array.from({ length: 5 }).map((_, index) => ( + +
+ + + + Everai + + + + Collection description + + + Floor price 0.2 eth + + +
+
+ ))} +
+ + +
+
+
+ ); +} diff --git a/apps/arkmarket/src/components/auth-switcher.tsx b/apps/arkmarket/components/auth-switcher.tsx similarity index 100% rename from apps/arkmarket/src/components/auth-switcher.tsx rename to apps/arkmarket/components/auth-switcher.tsx diff --git a/apps/arkmarket/src/components/authentication.tsx b/apps/arkmarket/components/authentication.tsx similarity index 100% rename from apps/arkmarket/src/components/authentication.tsx rename to apps/arkmarket/components/authentication.tsx diff --git a/apps/arkmarket/src/components/header.tsx b/apps/arkmarket/components/header.tsx similarity index 100% rename from apps/arkmarket/src/components/header.tsx rename to apps/arkmarket/components/header.tsx diff --git a/apps/arkmarket/components/icons.tsx b/apps/arkmarket/components/icons.tsx new file mode 100644 index 0000000..01a230a --- /dev/null +++ b/apps/arkmarket/components/icons.tsx @@ -0,0 +1,24 @@ +import React from "react"; + +type IconProps = React.HTMLAttributes; + +export const Icons = { + logo: (props: IconProps) => ( + + + + + ), +}; diff --git a/apps/arkmarket/src/components/main-nav.tsx b/apps/arkmarket/components/main-nav.tsx similarity index 77% rename from apps/arkmarket/src/components/main-nav.tsx rename to apps/arkmarket/components/main-nav.tsx index 2aec2be..ed5daac 100644 --- a/apps/arkmarket/src/components/main-nav.tsx +++ b/apps/arkmarket/components/main-nav.tsx @@ -6,6 +6,9 @@ import { usePathname } from "next/navigation"; import { cn } from "@ark-market/ui/lib/utils"; +import { Icons } from "~/components/icons"; +import { siteConfig } from "~/config/site"; + const mainNavLinks = [ { name: "Home", href: "/" }, { name: "Collections", href: "/collections" }, @@ -23,6 +26,12 @@ export function MainNav({ className={cn("flex items-center space-x-4 lg:space-x-6", className)} {...props} > + + + + {siteConfig.name} + + {mainNavLinks.map((mainNavLink) => { const isActiveLink = mainNavLink.href === pathname; diff --git a/apps/arkmarket/src/components/media.tsx b/apps/arkmarket/components/media.tsx similarity index 100% rename from apps/arkmarket/src/components/media.tsx rename to apps/arkmarket/components/media.tsx diff --git a/apps/arkmarket/src/components/providers.tsx b/apps/arkmarket/components/providers.tsx similarity index 100% rename from apps/arkmarket/src/components/providers.tsx rename to apps/arkmarket/components/providers.tsx diff --git a/apps/arkmarket/src/components/starknet-provider.tsx b/apps/arkmarket/components/starknet-provider.tsx similarity index 100% rename from apps/arkmarket/src/components/starknet-provider.tsx rename to apps/arkmarket/components/starknet-provider.tsx diff --git a/apps/arkmarket/src/components/user-nav.tsx b/apps/arkmarket/components/user-nav.tsx similarity index 100% rename from apps/arkmarket/src/components/user-nav.tsx rename to apps/arkmarket/components/user-nav.tsx diff --git a/apps/arkmarket/config/site.ts b/apps/arkmarket/config/site.ts new file mode 100644 index 0000000..67ac3fa --- /dev/null +++ b/apps/arkmarket/config/site.ts @@ -0,0 +1,13 @@ +export const siteConfig = { + name: "ArkMarket", + url: "https://market.arkproject.dev", + ogImage: "", + description: + "Clean and simple ArkProject marketplace starter repo using Turbo repo.", + links: { + twitter: "https://twitter.com/ArkProjectNFTs", + github: "https://github.com/ArkProjectNFTs/ark-market", + }, +}; + +export type SiteConfig = typeof siteConfig; diff --git a/apps/arkmarket/src/env.ts b/apps/arkmarket/env.ts similarity index 100% rename from apps/arkmarket/src/env.ts rename to apps/arkmarket/env.ts diff --git a/apps/arkmarket/next.config.js b/apps/arkmarket/next.config.js index e714843..113d562 100644 --- a/apps/arkmarket/next.config.js +++ b/apps/arkmarket/next.config.js @@ -2,7 +2,7 @@ import { fileURLToPath } from "url"; import createJiti from "jiti"; // Import env files to validate at build time. Use jiti so we can load .ts files in here. -createJiti(fileURLToPath(import.meta.url))("./src/env"); +createJiti(fileURLToPath(import.meta.url))("./env"); /** @type {import("next").NextConfig} */ const config = { diff --git a/apps/arkmarket/public/logo.svg b/apps/arkmarket/public/logo.svg new file mode 100644 index 0000000..8f3c1be --- /dev/null +++ b/apps/arkmarket/public/logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/arkmarket/src/app/page.tsx b/apps/arkmarket/src/app/page.tsx deleted file mode 100644 index 4228ad7..0000000 --- a/apps/arkmarket/src/app/page.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import Link from "next/link"; - -import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@ark-market/ui/components/card"; - -export default async function HomePage() { - return ( -
-
-

Homepage

-
- - - - Everai - - - Collection description - - 0.2 eth - - -
-
-
- ); -} diff --git a/apps/arkmarket/tailwind.config.ts b/apps/arkmarket/tailwind.config.ts index 20ddc2f..3331a2c 100644 --- a/apps/arkmarket/tailwind.config.ts +++ b/apps/arkmarket/tailwind.config.ts @@ -1,7 +1,8 @@ import type { Config } from "tailwindcss"; -import baseConfig from "@ark-market/tailwind-config/web"; import { fontFamily } from "tailwindcss/defaultTheme"; +import baseConfig from "@ark-market/tailwind-config/web"; + export default { // We need to append the path to the UI package to the content array so that // those classes are included correctly. diff --git a/apps/arkmarket/tsconfig.json b/apps/arkmarket/tsconfig.json index 84b2869..2f1890f 100644 --- a/apps/arkmarket/tsconfig.json +++ b/apps/arkmarket/tsconfig.json @@ -10,7 +10,7 @@ "baseUrl": ".", "paths": { "~/*": [ - "./src/*" + "./*" ] }, "plugins": [ diff --git a/apps/arkmarket/src/types/index.ts b/apps/arkmarket/types/index.ts similarity index 100% rename from apps/arkmarket/src/types/index.ts rename to apps/arkmarket/types/index.ts diff --git a/apps/arkmarket/src/types/schema.ts b/apps/arkmarket/types/schema.ts similarity index 100% rename from apps/arkmarket/src/types/schema.ts rename to apps/arkmarket/types/schema.ts diff --git a/packages/ui/components.json b/packages/ui/components.json index a106f64..089b0c7 100644 --- a/packages/ui/components.json +++ b/packages/ui/components.json @@ -11,7 +11,8 @@ "prefix": "" }, "aliases": { - "components": "@/components", - "utils": "@ark-market/ui/lib/utils" + "components": "@ark-market/ui/components", + "utils": "@ark-market/ui/lib/utils", + "ui": "@ark-market/ui/components" } } diff --git a/packages/ui/package.json b/packages/ui/package.json index e7980d2..026bcfb 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -7,11 +7,11 @@ "./globals.css": "./src/globals.css", "./postcss.config": "./postcss.config.js", "./lib/*": "./src/lib/*.ts", - "./components/*": "./src/components/ui/*.tsx" + "./components/*": "./src/components/*.tsx" }, "license": "MIT", "scripts": { - "add": "pnpm dlx shadcn-ui add", + "add": "pnpm dlx shadcn-ui add -p src/components", "clean": "rm -rf .turbo node_modules", "format": "prettier --check . --ignore-path ../../.gitignore", "lint": "eslint .", @@ -34,6 +34,7 @@ "class-variance-authority": "^0.7.0", "clsx": "^2.1.0", "cmdk": "^1.0.0", + "embla-carousel-react": "^8.0.2", "ethers": "^6.11.1", "next-themes": "^0.2.1", "react-hook-form": "^7.51.1", diff --git a/packages/ui/src/components/ui/accordion.tsx b/packages/ui/src/components/accordion.tsx similarity index 100% rename from packages/ui/src/components/ui/accordion.tsx rename to packages/ui/src/components/accordion.tsx diff --git a/packages/ui/src/components/ui/avatar.tsx b/packages/ui/src/components/avatar.tsx similarity index 100% rename from packages/ui/src/components/ui/avatar.tsx rename to packages/ui/src/components/avatar.tsx diff --git a/packages/ui/src/components/ui/badge.tsx b/packages/ui/src/components/badge.tsx similarity index 100% rename from packages/ui/src/components/ui/badge.tsx rename to packages/ui/src/components/badge.tsx diff --git a/packages/ui/src/components/ui/button.tsx b/packages/ui/src/components/button.tsx similarity index 72% rename from packages/ui/src/components/ui/button.tsx rename to packages/ui/src/components/button.tsx index 22eace6..f87dd1d 100644 --- a/packages/ui/src/components/ui/button.tsx +++ b/packages/ui/src/components/button.tsx @@ -1,16 +1,15 @@ -import type { VariantProps } from "class-variance-authority"; -import * as React from "react"; -import { Slot } from "@radix-ui/react-slot"; -import { cva } from "class-variance-authority"; +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" -import { cn } from "@ark-market/ui/lib/utils"; +import { cn } from "@ark-market/ui/lib/utils" const buttonVariants = cva( "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", { variants: { variant: { - primary: + default: "bg-primary text-primary-foreground shadow hover:bg-primary/90", destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90", @@ -22,37 +21,37 @@ const buttonVariants = cva( link: "text-primary underline-offset-4 hover:underline", }, size: { + default: "h-9 px-4 py-2", sm: "h-8 rounded-md px-3 text-xs", - md: "h-9 px-4 py-2", lg: "h-10 rounded-md px-8", - icon: "size-9", + icon: "h-9 w-9", }, }, defaultVariants: { - variant: "primary", - size: "md", + variant: "default", + size: "default", }, - }, -); + } +) -interface ButtonProps +export interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps { - asChild?: boolean; + asChild?: boolean } const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button"; + const Comp = asChild ? Slot : "button" return ( - ); - }, -); -Button.displayName = "Button"; + ) + } +) +Button.displayName = "Button" -export { Button, buttonVariants }; +export { Button, buttonVariants } diff --git a/packages/ui/src/components/ui/card.tsx b/packages/ui/src/components/card.tsx similarity index 100% rename from packages/ui/src/components/ui/card.tsx rename to packages/ui/src/components/card.tsx diff --git a/packages/ui/src/components/carousel.tsx b/packages/ui/src/components/carousel.tsx new file mode 100644 index 0000000..e5a04c1 --- /dev/null +++ b/packages/ui/src/components/carousel.tsx @@ -0,0 +1,262 @@ +"use client" + +import * as React from "react" +import { ArrowLeftIcon, ArrowRightIcon } from "@radix-ui/react-icons" +import useEmblaCarousel, { + type UseEmblaCarouselType, +} from "embla-carousel-react" + +import { cn } from "@ark-market/ui/lib/utils" +import { Button } from "@ark-market/ui/components/button" + +type CarouselApi = UseEmblaCarouselType[1] +type UseCarouselParameters = Parameters +type CarouselOptions = UseCarouselParameters[0] +type CarouselPlugin = UseCarouselParameters[1] + +type CarouselProps = { + opts?: CarouselOptions + plugins?: CarouselPlugin + orientation?: "horizontal" | "vertical" + setApi?: (api: CarouselApi) => void +} + +type CarouselContextProps = { + carouselRef: ReturnType[0] + api: ReturnType[1] + scrollPrev: () => void + scrollNext: () => void + canScrollPrev: boolean + canScrollNext: boolean +} & CarouselProps + +const CarouselContext = React.createContext(null) + +function useCarousel() { + const context = React.useContext(CarouselContext) + + if (!context) { + throw new Error("useCarousel must be used within a ") + } + + return context +} + +const Carousel = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes & CarouselProps +>( + ( + { + orientation = "horizontal", + opts, + setApi, + plugins, + className, + children, + ...props + }, + ref + ) => { + const [carouselRef, api] = useEmblaCarousel( + { + ...opts, + axis: orientation === "horizontal" ? "x" : "y", + }, + plugins + ) + const [canScrollPrev, setCanScrollPrev] = React.useState(false) + const [canScrollNext, setCanScrollNext] = React.useState(false) + + const onSelect = React.useCallback((api: CarouselApi) => { + if (!api) { + return + } + + setCanScrollPrev(api.canScrollPrev()) + setCanScrollNext(api.canScrollNext()) + }, []) + + const scrollPrev = React.useCallback(() => { + api?.scrollPrev() + }, [api]) + + const scrollNext = React.useCallback(() => { + api?.scrollNext() + }, [api]) + + const handleKeyDown = React.useCallback( + (event: React.KeyboardEvent) => { + if (event.key === "ArrowLeft") { + event.preventDefault() + scrollPrev() + } else if (event.key === "ArrowRight") { + event.preventDefault() + scrollNext() + } + }, + [scrollPrev, scrollNext] + ) + + React.useEffect(() => { + if (!api || !setApi) { + return + } + + setApi(api) + }, [api, setApi]) + + React.useEffect(() => { + if (!api) { + return + } + + onSelect(api) + api.on("reInit", onSelect) + api.on("select", onSelect) + + return () => { + api?.off("select", onSelect) + } + }, [api, onSelect]) + + return ( + +
+ {children} +
+
+ ) + } +) +Carousel.displayName = "Carousel" + +const CarouselContent = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => { + const { carouselRef, orientation } = useCarousel() + + return ( +
+
+
+ ) +}) +CarouselContent.displayName = "CarouselContent" + +const CarouselItem = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => { + const { orientation } = useCarousel() + + return ( +
+ ) +}) +CarouselItem.displayName = "CarouselItem" + +const CarouselPrevious = React.forwardRef< + HTMLButtonElement, + React.ComponentProps +>(({ className, variant = "outline", size = "icon", ...props }, ref) => { + const { orientation, scrollPrev, canScrollPrev } = useCarousel() + + return ( + + ) +}) +CarouselPrevious.displayName = "CarouselPrevious" + +const CarouselNext = React.forwardRef< + HTMLButtonElement, + React.ComponentProps +>(({ className, variant = "outline", size = "icon", ...props }, ref) => { + const { orientation, scrollNext, canScrollNext } = useCarousel() + + return ( + + ) +}) +CarouselNext.displayName = "CarouselNext" + +export { + type CarouselApi, + Carousel, + CarouselContent, + CarouselItem, + CarouselPrevious, + CarouselNext, +} diff --git a/packages/ui/src/components/ui/command.tsx b/packages/ui/src/components/command.tsx similarity index 100% rename from packages/ui/src/components/ui/command.tsx rename to packages/ui/src/components/command.tsx diff --git a/packages/ui/src/components/ui/dialog.tsx b/packages/ui/src/components/dialog.tsx similarity index 100% rename from packages/ui/src/components/ui/dialog.tsx rename to packages/ui/src/components/dialog.tsx diff --git a/packages/ui/src/components/ui/dropdown-menu.tsx b/packages/ui/src/components/dropdown-menu.tsx similarity index 100% rename from packages/ui/src/components/ui/dropdown-menu.tsx rename to packages/ui/src/components/dropdown-menu.tsx diff --git a/packages/ui/src/components/ui/form.tsx b/packages/ui/src/components/form.tsx similarity index 100% rename from packages/ui/src/components/ui/form.tsx rename to packages/ui/src/components/form.tsx diff --git a/packages/ui/src/components/ui/input.tsx b/packages/ui/src/components/input.tsx similarity index 100% rename from packages/ui/src/components/ui/input.tsx rename to packages/ui/src/components/input.tsx diff --git a/packages/ui/src/components/ui/label.tsx b/packages/ui/src/components/label.tsx similarity index 100% rename from packages/ui/src/components/ui/label.tsx rename to packages/ui/src/components/label.tsx diff --git a/packages/ui/src/components/ui/popover.tsx b/packages/ui/src/components/popover.tsx similarity index 100% rename from packages/ui/src/components/ui/popover.tsx rename to packages/ui/src/components/popover.tsx diff --git a/packages/ui/src/components/ui/scroll-area.tsx b/packages/ui/src/components/scroll-area.tsx similarity index 100% rename from packages/ui/src/components/ui/scroll-area.tsx rename to packages/ui/src/components/scroll-area.tsx diff --git a/packages/ui/src/components/ui/select.tsx b/packages/ui/src/components/select.tsx similarity index 100% rename from packages/ui/src/components/ui/select.tsx rename to packages/ui/src/components/select.tsx diff --git a/packages/ui/src/components/ui/separator.tsx b/packages/ui/src/components/separator.tsx similarity index 100% rename from packages/ui/src/components/ui/separator.tsx rename to packages/ui/src/components/separator.tsx diff --git a/packages/ui/src/components/ui/table.tsx b/packages/ui/src/components/table.tsx similarity index 100% rename from packages/ui/src/components/ui/table.tsx rename to packages/ui/src/components/table.tsx diff --git a/packages/ui/src/components/ui/theme.tsx b/packages/ui/src/components/theme.tsx similarity index 100% rename from packages/ui/src/components/ui/theme.tsx rename to packages/ui/src/components/theme.tsx diff --git a/packages/ui/src/components/ui/toast.tsx b/packages/ui/src/components/toast.tsx similarity index 100% rename from packages/ui/src/components/ui/toast.tsx rename to packages/ui/src/components/toast.tsx diff --git a/packages/ui/src/components/ui/tooltip.tsx b/packages/ui/src/components/tooltip.tsx similarity index 100% rename from packages/ui/src/components/ui/tooltip.tsx rename to packages/ui/src/components/tooltip.tsx diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8d912d2..161998f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -180,6 +180,9 @@ importers: cmdk: specifier: ^1.0.0 version: 1.0.0(@types/react@18.2.79)(react-dom@18.2.0)(react@18.2.0) + embla-carousel-react: + specifier: ^8.0.2 + version: 8.0.2(react@18.2.0) ethers: specifier: ^6.11.1 version: 6.11.1 @@ -3025,6 +3028,28 @@ packages: resolution: {integrity: sha512-lwKft2CLFztD+vEIpesrOtCrko/TFnEJlHFdRhazU7Y/jx5qc4cqsocfVrBg4So4gGe9lvxnbLIoev47WMpg+A==} dev: false + /embla-carousel-react@8.0.2(react@18.2.0): + resolution: {integrity: sha512-RHe1GKLulOW8EDN+cJgbFbVVfRXcaLT2/89dyVw3ONGgVpZjD19wB87I1LUZ1aCzOSrTccx0PFSQanK4OOfGPA==} + peerDependencies: + react: ^16.8.0 || ^17.0.1 || ^18.0.0 + dependencies: + embla-carousel: 8.0.2 + embla-carousel-reactive-utils: 8.0.2(embla-carousel@8.0.2) + react: 18.2.0 + dev: false + + /embla-carousel-reactive-utils@8.0.2(embla-carousel@8.0.2): + resolution: {integrity: sha512-nLZqDkQdO0hvOP49/dUwjkkepMnUXgIzhyRuDjwGqswpB4Ibnc5M+w7rSQQAM+uMj0cPaXnYOTlv8XD7I/zVNw==} + peerDependencies: + embla-carousel: 8.0.2 + dependencies: + embla-carousel: 8.0.2 + dev: false + + /embla-carousel@8.0.2: + resolution: {integrity: sha512-bogsDO8xosuh/l3PxIvA5AMl3+BnRVAse9sDW/60amzj4MbGS5re4WH5eVEXiuH8G1/3G7QUAX2QNr3Yx8z5rA==} + dev: false + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} diff --git a/tooling/tailwind/base.ts b/tooling/tailwind/base.ts index 15fd759..00bcad0 100644 --- a/tooling/tailwind/base.ts +++ b/tooling/tailwind/base.ts @@ -2,7 +2,7 @@ import type { Config } from "tailwindcss"; export default { darkMode: ["class"], - content: ["src/**/*.{ts,tsx}"], + content: ["**/*.{ts,tsx}"], theme: { extend: { colors: { From 7f6e66f26f7d860b4a85199d02fcb9ffec00109d Mon Sep 17 00:00:00 2001 From: kwiss Date: Fri, 19 Apr 2024 14:47:24 +0200 Subject: [PATCH 2/2] feat(asset): move asset page to non auth page --- .../[token_id]/components/asset-infos.tsx | 0 .../[token_id]/components/asset.tsx | 0 .../[token_id]/components/cancel-listing.tsx | 0 .../[token_id]/components/create-listing.tsx | 0 .../[token_id]/components/create-offer.tsx | 0 .../[token_id]/components/fulfill-listing.tsx | 0 .../[token_id]/components/fulfill-offer.tsx | 0 .../[token_id]/components/token-activity.tsx | 0 .../[token_id]/components/token-offers.tsx | 4 +-- .../[contract_address]/[token_id]/data.ts | 0 .../[contract_address]/[token_id]/page.tsx | 0 .../components/collection.tsx | 8 +++--- .../[collectionAddress]/components/header.tsx | 15 +++++++++++ .../collection/[collectionAddress]/layout.tsx | 25 +++++++++++++++++++ .../collection/[collectionAddress]/page.tsx | 8 +++--- .../queries/fetchCollectionMetadata.ts | 16 ++++++++++++ ...tionMarket.ts => fetchTokensMarketdata.ts} | 2 +- ...chCollection.ts => fetchTokensMetadata.ts} | 2 +- 18 files changed, 68 insertions(+), 12 deletions(-) rename apps/arkmarket/app/{(authenticated) => }/assets/[contract_address]/[token_id]/components/asset-infos.tsx (100%) rename apps/arkmarket/app/{(authenticated) => }/assets/[contract_address]/[token_id]/components/asset.tsx (100%) rename apps/arkmarket/app/{(authenticated) => }/assets/[contract_address]/[token_id]/components/cancel-listing.tsx (100%) rename apps/arkmarket/app/{(authenticated) => }/assets/[contract_address]/[token_id]/components/create-listing.tsx (100%) rename apps/arkmarket/app/{(authenticated) => }/assets/[contract_address]/[token_id]/components/create-offer.tsx (100%) rename apps/arkmarket/app/{(authenticated) => }/assets/[contract_address]/[token_id]/components/fulfill-listing.tsx (100%) rename apps/arkmarket/app/{(authenticated) => }/assets/[contract_address]/[token_id]/components/fulfill-offer.tsx (100%) rename apps/arkmarket/app/{(authenticated) => }/assets/[contract_address]/[token_id]/components/token-activity.tsx (100%) rename apps/arkmarket/app/{(authenticated) => }/assets/[contract_address]/[token_id]/components/token-offers.tsx (97%) rename apps/arkmarket/app/{(authenticated) => }/assets/[contract_address]/[token_id]/data.ts (100%) rename apps/arkmarket/app/{(authenticated) => }/assets/[contract_address]/[token_id]/page.tsx (100%) create mode 100644 apps/arkmarket/app/collection/[collectionAddress]/components/header.tsx create mode 100644 apps/arkmarket/app/collection/[collectionAddress]/layout.tsx create mode 100644 apps/arkmarket/app/collection/[collectionAddress]/queries/fetchCollectionMetadata.ts rename apps/arkmarket/app/collection/[collectionAddress]/queries/{fetchCollectionMarket.ts => fetchTokensMarketdata.ts} (84%) rename apps/arkmarket/app/collection/[collectionAddress]/queries/{fetchCollection.ts => fetchTokensMetadata.ts} (84%) diff --git a/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset-infos.tsx b/apps/arkmarket/app/assets/[contract_address]/[token_id]/components/asset-infos.tsx similarity index 100% rename from apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset-infos.tsx rename to apps/arkmarket/app/assets/[contract_address]/[token_id]/components/asset-infos.tsx diff --git a/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset.tsx b/apps/arkmarket/app/assets/[contract_address]/[token_id]/components/asset.tsx similarity index 100% rename from apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/asset.tsx rename to apps/arkmarket/app/assets/[contract_address]/[token_id]/components/asset.tsx diff --git a/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/cancel-listing.tsx b/apps/arkmarket/app/assets/[contract_address]/[token_id]/components/cancel-listing.tsx similarity index 100% rename from apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/cancel-listing.tsx rename to apps/arkmarket/app/assets/[contract_address]/[token_id]/components/cancel-listing.tsx diff --git a/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-listing.tsx b/apps/arkmarket/app/assets/[contract_address]/[token_id]/components/create-listing.tsx similarity index 100% rename from apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-listing.tsx rename to apps/arkmarket/app/assets/[contract_address]/[token_id]/components/create-listing.tsx diff --git a/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-offer.tsx b/apps/arkmarket/app/assets/[contract_address]/[token_id]/components/create-offer.tsx similarity index 100% rename from apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/create-offer.tsx rename to apps/arkmarket/app/assets/[contract_address]/[token_id]/components/create-offer.tsx diff --git a/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-listing.tsx b/apps/arkmarket/app/assets/[contract_address]/[token_id]/components/fulfill-listing.tsx similarity index 100% rename from apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-listing.tsx rename to apps/arkmarket/app/assets/[contract_address]/[token_id]/components/fulfill-listing.tsx diff --git a/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-offer.tsx b/apps/arkmarket/app/assets/[contract_address]/[token_id]/components/fulfill-offer.tsx similarity index 100% rename from apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/fulfill-offer.tsx rename to apps/arkmarket/app/assets/[contract_address]/[token_id]/components/fulfill-offer.tsx diff --git a/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-activity.tsx b/apps/arkmarket/app/assets/[contract_address]/[token_id]/components/token-activity.tsx similarity index 100% rename from apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-activity.tsx rename to apps/arkmarket/app/assets/[contract_address]/[token_id]/components/token-activity.tsx diff --git a/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-offers.tsx b/apps/arkmarket/app/assets/[contract_address]/[token_id]/components/token-offers.tsx similarity index 97% rename from apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-offers.tsx rename to apps/arkmarket/app/assets/[contract_address]/[token_id]/components/token-offers.tsx index 89de644..621d4d2 100644 --- a/apps/arkmarket/app/(authenticated)/assets/[contract_address]/[token_id]/components/token-offers.tsx +++ b/apps/arkmarket/app/assets/[contract_address]/[token_id]/components/token-offers.tsx @@ -46,7 +46,7 @@ const TokenOffers: React.FC = ({ token }) => { const { address, account } = useAccount(); const isOwner = address && areAddressesEqual(token.owner, address); const { fulfillOffer } = useFulfillOffer(); - if (account === undefined) return null; + const isConnected = account !== undefined; return (
@@ -100,7 +100,7 @@ const TokenOffers: React.FC = ({ token }) => { {truncateString(offer.offer_maker, 8)} - {isOwner && ( + {isConnected && isOwner && (