From 0bd19a5af7747e5c39650e5c77dc9299dcda5ee8 Mon Sep 17 00:00:00 2001 From: Yohan Tancrez Date: Thu, 27 Jun 2024 01:29:56 +0200 Subject: [PATCH 01/15] feat: feedbacks --- .../[contractAddress]/[tokenId]/components/token-actions.tsx | 2 +- .../[contractAddress]/[tokenId]/components/token-summary.tsx | 3 ++- .../[contractAddress]/[tokenId]/components/token-traits.tsx | 2 +- .../src/app/token/[contractAddress]/[tokenId]/page.tsx | 5 ++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx index e1faddc5..60862c46 100644 --- a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx @@ -29,7 +29,7 @@ export default function TokenActions({ <>
diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-summary.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-summary.tsx index 929e4817..38d21fe9 100644 --- a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-summary.tsx +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-summary.tsx @@ -27,7 +27,6 @@ export default function TokenSummary({ className, )} > - {/* TODO @YohanTz: Specify height and width to use image proxy when implemented */}
diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-traits.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-traits.tsx index 1ac32192..a05175b4 100644 --- a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-traits.tsx +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-traits.tsx @@ -48,7 +48,7 @@ export default function TokenTraits({
-
+
{tokenAttributes.map((tokenAttribute, index) => { return (
diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/page.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/page.tsx index 5f55b3b5..838dbeb3 100644 --- a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/page.tsx +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/page.tsx @@ -44,7 +44,10 @@ export default async function TokenPage({ tokenInfos={tokenInfosInitialData.data} className="mb-8 lg:mb-0" /> - +
Date: Thu, 27 Jun 2024 01:53:59 +0200 Subject: [PATCH 02/15] token bar animation --- .../collection-item-sorting-select.tsx | 2 +- .../components/collection-items-activity.tsx | 2 +- .../components/collection-items-data.tsx | 4 +- .../components/collection-items-tools-bar.tsx | 2 +- .../components/collection.tsx | 4 +- .../collection/[collectionAddress]/page.tsx | 2 +- .../queries/getCollectionData.ts | 2 +- .../search-params.ts | 0 .../components/token-actions-bar.tsx | 63 ++++++++++++------- .../[tokenId]/components/token-actions.tsx | 9 +-- .../[walletAddress]/components/portfolio.tsx | 2 +- packages/ui/src/dialog.tsx | 4 +- 12 files changed, 56 insertions(+), 40 deletions(-) rename apps/arkmarket/src/app/collection/{ => [collectionAddress]}/search-params.ts (100%) diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-item-sorting-select.tsx b/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-item-sorting-select.tsx index d80aea99..3621c52c 100644 --- a/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-item-sorting-select.tsx +++ b/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-item-sorting-select.tsx @@ -11,7 +11,7 @@ import { import type { CollectionSortBy, CollectionSortDirection, -} from "../../search-params"; +} from "../search-params"; interface CollectionItemsSortingSelectProps { setSortBy: (sortBy: CollectionSortBy) => void; diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-activity.tsx b/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-activity.tsx index 0a54335d..9361de2f 100644 --- a/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-activity.tsx +++ b/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-activity.tsx @@ -12,7 +12,7 @@ import { collectionSortByParser, collectionSortDirectionKey, collectionSortDirectionsParser, -} from "../../search-params"; +} from "../search-params"; import CollectionItemsActivityHeader from "./collection-items-activity-header"; import CollectionItemsData from "./collection-items-data"; import CollectionItemsFiltersPanel from "./collection-items-filters-panel"; diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-data.tsx b/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-data.tsx index b4ae47ee..f880ffa6 100644 --- a/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-data.tsx +++ b/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-data.tsx @@ -4,11 +4,11 @@ import { useMemo } from "react"; import { useInfiniteQuery } from "@tanstack/react-query"; import type { ViewType } from "../../../../components/view-type-toggle-group"; +import type { CollectionTokensApiResponse } from "../queries/getCollectionData"; import type { CollectionSortBy, CollectionSortDirection, -} from "../../search-params"; -import type { CollectionTokensApiResponse } from "../queries/getCollectionData"; +} from "../search-params"; import useInfiniteWindowScroll from "~/hooks/useInfiniteWindowScroll"; import { getCollectionTokens } from "../queries/getCollectionData"; import CollectionItemsDataGridView from "./collection-items-data-grid-view"; diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-tools-bar.tsx b/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-tools-bar.tsx index d85b6cff..d833e93d 100644 --- a/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-tools-bar.tsx +++ b/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection-items-tools-bar.tsx @@ -11,7 +11,7 @@ import type { ViewType } from "../../../../components/view-type-toggle-group"; import type { CollectionSortBy, CollectionSortDirection, -} from "../../search-params"; +} from "../search-params"; import ViewTypeToggleButton from "../../../../components/view-type-toggle-button"; import ViewTypeToggleGroup from "../../../../components/view-type-toggle-group"; import CollectionItemsSortingSelect from "./collection-item-sorting-select"; diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection.tsx b/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection.tsx index 1cabf1c0..f0fb8d35 100644 --- a/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection.tsx +++ b/apps/arkmarket/src/app/collection/[collectionAddress]/components/collection.tsx @@ -9,13 +9,13 @@ import type { CollectionTokensApiResponse, } from "../queries/getCollectionData"; import type { ViewType } from "~/components/view-type-toggle-group"; +import { getCollectionInfos } from "../queries/getCollectionData"; import { collectionSortByKey, collectionSortByParser, collectionSortDirectionKey, collectionSortDirectionsParser, -} from "../../search-params"; -import { getCollectionInfos } from "../queries/getCollectionData"; +} from "../search-params"; import CollectionBanner from "./collection-banner"; import CollectionHeader from "./collection-header"; import CollectionItemsActivityHeader from "./collection-items-activity-header"; diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/page.tsx b/apps/arkmarket/src/app/collection/[collectionAddress]/page.tsx index d08c25f1..225bce5b 100644 --- a/apps/arkmarket/src/app/collection/[collectionAddress]/page.tsx +++ b/apps/arkmarket/src/app/collection/[collectionAddress]/page.tsx @@ -1,11 +1,11 @@ import { notFound } from "next/navigation"; -import { collectionPageSearchParamsCache } from "../search-params"; import Collection from "./components/collection"; import { getCollectionInfos, getCollectionTokens, } from "./queries/getCollectionData"; +import { collectionPageSearchParamsCache } from "./search-params"; interface CollectionPageProps { params: { diff --git a/apps/arkmarket/src/app/collection/[collectionAddress]/queries/getCollectionData.ts b/apps/arkmarket/src/app/collection/[collectionAddress]/queries/getCollectionData.ts index 990b945b..75f84a9d 100644 --- a/apps/arkmarket/src/app/collection/[collectionAddress]/queries/getCollectionData.ts +++ b/apps/arkmarket/src/app/collection/[collectionAddress]/queries/getCollectionData.ts @@ -1,7 +1,7 @@ import type { CollectionSortBy, CollectionSortDirection, -} from "../../search-params"; +} from "../search-params"; import { env } from "~/env"; export interface CollectionInfosApiResponse { diff --git a/apps/arkmarket/src/app/collection/search-params.ts b/apps/arkmarket/src/app/collection/[collectionAddress]/search-params.ts similarity index 100% rename from apps/arkmarket/src/app/collection/search-params.ts rename to apps/arkmarket/src/app/collection/[collectionAddress]/search-params.ts diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions-bar.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions-bar.tsx index f0b22148..8e5cba8c 100644 --- a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions-bar.tsx +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions-bar.tsx @@ -1,3 +1,4 @@ +import { AnimatePresence, motion } from "framer-motion"; import { ShoppingBag, Tag } from "lucide-react"; import { Button } from "@ark-market/ui/button"; @@ -6,33 +7,47 @@ import type { TokenInfosApiResponse } from "../queries/getTokenData"; import Media from "~/components/media"; interface TokenActionsBar { + show: boolean; tokenInfos: TokenInfosApiResponse["data"]; } -export default function TokenActionsBar({ tokenInfos }: TokenActionsBar) { +export default function TokenActionsBar({ show, tokenInfos }: TokenActionsBar) { return ( -
-
- -

{tokenInfos.metadata?.name}

-
-
- - -
-
+ + {show && ( + +
+ +

{tokenInfos.metadata?.name}

+
+
+ + +
+
+ )} +
); } diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx index 60862c46..353fa162 100644 --- a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx @@ -23,7 +23,7 @@ export default function TokenActions({ const ref = useRef(null); const isActionItemsInView = useInView(ref, { margin: "-72px 0px 0px 0px" }); const isSSR = useIsSSR(); - const shouldShowTokenActionsTopBar = !isSSR && !isActionItemsInView; + const shouldShowFixedTokenActions = !isSSR && !isActionItemsInView; return ( <> @@ -74,9 +74,10 @@ export default function TokenActions({
- {shouldShowTokenActionsTopBar && ( - - )} + ); } diff --git a/apps/arkmarket/src/app/wallet/[walletAddress]/components/portfolio.tsx b/apps/arkmarket/src/app/wallet/[walletAddress]/components/portfolio.tsx index 5dafd646..2ed029d7 100644 --- a/apps/arkmarket/src/app/wallet/[walletAddress]/components/portfolio.tsx +++ b/apps/arkmarket/src/app/wallet/[walletAddress]/components/portfolio.tsx @@ -49,7 +49,7 @@ export default function Portfolio({ value="items" className="flex items-center gap-2" > - My Items{" "} + Items{" "}

{formatNumber(walletTokensInitialData.token_count)}

diff --git a/packages/ui/src/dialog.tsx b/packages/ui/src/dialog.tsx index edee8a76..c61ec26e 100644 --- a/packages/ui/src/dialog.tsx +++ b/packages/ui/src/dialog.tsx @@ -38,13 +38,13 @@ const DialogContent = React.forwardRef< {children} - + Close From 15821e757e0c4b1e330ea318979f9792b1541cb9 Mon Sep 17 00:00:00 2001 From: Yohan Tancrez Date: Thu, 27 Jun 2024 01:55:59 +0200 Subject: [PATCH 03/15] fix: lint --- .../components/portfolio-items-sorting-select.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/arkmarket/src/app/wallet/[walletAddress]/components/portfolio-items-sorting-select.tsx b/apps/arkmarket/src/app/wallet/[walletAddress]/components/portfolio-items-sorting-select.tsx index cd50d715..3658f74b 100644 --- a/apps/arkmarket/src/app/wallet/[walletAddress]/components/portfolio-items-sorting-select.tsx +++ b/apps/arkmarket/src/app/wallet/[walletAddress]/components/portfolio-items-sorting-select.tsx @@ -11,7 +11,7 @@ import { import type { CollectionSortBy, CollectionSortDirection, -} from "~/app/collection/search-params"; +} from "~/app/collection/[collectionAddress]/search-params"; interface PortfolioItemsSortingSelectProps { setSortBy: (sortBy: CollectionSortBy) => void; From fe4bd26a2d9083a622f307132a387e265afc18be Mon Sep 17 00:00:00 2001 From: Yohan Tancrez Date: Thu, 27 Jun 2024 02:27:40 +0200 Subject: [PATCH 04/15] added mobile button action on token page --- .../components/mobile-token-action.tsx | 38 +++++++++++++++++++ .../components/token-actions-bar.tsx | 13 ++++++- .../[tokenId]/components/token-actions.tsx | 7 ++++ 3 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/mobile-token-action.tsx diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/mobile-token-action.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/mobile-token-action.tsx new file mode 100644 index 00000000..6cd1352e --- /dev/null +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/mobile-token-action.tsx @@ -0,0 +1,38 @@ +import { AnimatePresence, motion } from "framer-motion"; +import { ShoppingBag } from "lucide-react"; + +import type { PropsWithClassName } from "@ark-market/ui"; +import { cn, formatUnits } from "@ark-market/ui"; +import { Button } from "@ark-market/ui/button"; + +import type { TokenInfosApiResponse } from "../queries/getTokenData"; + +const MotionButton = motion(Button); + +interface MobileTokenActionProps { + show: boolean; + tokenInfos: TokenInfosApiResponse["data"]; +} + +export default function MobileTokenAction({ + show, + tokenInfos, + className, +}: PropsWithClassName) { + return ( + + {show && ( + + + Buy now for {formatUnits(BigInt(tokenInfos.price ?? "0"), 18)} ETH + + )} + + ); +} diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions-bar.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions-bar.tsx index 8e5cba8c..3b950227 100644 --- a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions-bar.tsx +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions-bar.tsx @@ -1,6 +1,8 @@ import { AnimatePresence, motion } from "framer-motion"; import { ShoppingBag, Tag } from "lucide-react"; +import type { PropsWithClassName } from "@ark-market/ui"; +import { cn } from "@ark-market/ui"; import { Button } from "@ark-market/ui/button"; import type { TokenInfosApiResponse } from "../queries/getTokenData"; @@ -11,7 +13,11 @@ interface TokenActionsBar { tokenInfos: TokenInfosApiResponse["data"]; } -export default function TokenActionsBar({ show, tokenInfos }: TokenActionsBar) { +export default function TokenActionsBar({ + className, + show, + tokenInfos, +}: PropsWithClassName) { return ( {show && ( @@ -20,7 +26,10 @@ export default function TokenActionsBar({ show, tokenInfos }: TokenActionsBar) { animate={{ transform: "translateY(0%)" }} exit={{ transform: "translateY(-100%)" }} transition={{ ease: "easeInOut", duration: 0.3 }} - className="fixed left-0 top-0 z-50 hidden h-[var(--site-header-height)] w-full items-center justify-between border-b border-border bg-background px-8 lg:flex" + className={cn( + "fixed left-0 top-0 z-50 h-[var(--site-header-height)] w-full items-center justify-between border-b border-border bg-background px-8", + className, + )} >
+ ); From 2d468c15d16a5cea829e743c0f003591f8913838 Mon Sep 17 00:00:00 2001 From: Yohan Tancrez Date: Thu, 27 Jun 2024 11:12:19 +0200 Subject: [PATCH 05/15] feat: feedbacks --- .../[tokenId]/components/token-activity.tsx | 2 +- .../[tokenId]/components/token-summary.tsx | 18 ++++++++++++------ .../[tokenId]/components/token-traits.tsx | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-activity.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-activity.tsx index 20a9fa16..370457a2 100644 --- a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-activity.tsx +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-activity.tsx @@ -67,7 +67,7 @@ const activityData = [ export default function TokenActivity({ className }: PropsWithClassName) { return (
-
+

Activity

{activityData.length} diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-summary.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-summary.tsx index 38d21fe9..2302902a 100644 --- a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-summary.tsx +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-summary.tsx @@ -1,3 +1,4 @@ +import Link from "next/link"; import { RefreshCw, Share2 } from "lucide-react"; import type { PropsWithClassName } from "@ark-market/ui"; @@ -36,20 +37,25 @@ export default function TokenSummary({ tokenInfos.metadata?.name ?? `${tokenInfos.collection_name} #${tokenId}` } - className="w-full rounded-xs" + className="w-full rounded-lg" height={1000} width={1000} />
-
-

- {tokenInfos.collection_name} -

+
+ +

+ {tokenInfos.collection_name} +

+

{tokenInfos.metadata?.name}

diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-traits.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-traits.tsx index a05175b4..ab4f1a16 100644 --- a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-traits.tsx +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-traits.tsx @@ -34,7 +34,7 @@ export default function TokenTraits({ onOpenChange={setOpen} >
-
+

Traits

{tokenAttributes.length} From dec18714d13ee7ae042f5c8c20dd0cdd003d48e0 Mon Sep 17 00:00:00 2001 From: Yohan Tancrez Date: Thu, 27 Jun 2024 11:14:58 +0200 Subject: [PATCH 06/15] feat: spacings --- .../[tokenId]/components/token-actions.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx index ab4a2c7a..d6c05026 100644 --- a/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx +++ b/apps/arkmarket/src/app/token/[contractAddress]/[tokenId]/components/token-actions.tsx @@ -35,14 +35,14 @@ export default function TokenActions({ )} >
-

Best Price

+

Best Price

Time Left 12d 13h 45m

-
+

+ ) : ( +
+ View less + + )} +
+ + )}
); diff --git a/apps/arkmarket/src/components/site-header.tsx b/apps/arkmarket/src/components/site-header.tsx index 1fd4a4af..deb293d8 100644 --- a/apps/arkmarket/src/components/site-header.tsx +++ b/apps/arkmarket/src/components/site-header.tsx @@ -2,9 +2,6 @@ import * as React from "react"; import { Input } from "@ark-market/ui/input"; -// import { ThemeToggle } from "@ark-market/ui/theme"; - -// import { CommandMenu } from "~/components/command-menu"; import { MainNav } from "~/components/main-nav"; import { UserNav } from "~/components/user-nav"; @@ -13,7 +10,6 @@ export default function SiteHeader() {
- {/* */}
- {/* */}
); diff --git a/apps/arkmarket/src/config/homepage.ts b/apps/arkmarket/src/config/homepage.ts index 72bb45d1..7daaf5d7 100644 --- a/apps/arkmarket/src/config/homepage.ts +++ b/apps/arkmarket/src/config/homepage.ts @@ -1,212 +1,252 @@ -export const collections = [ - { - name: "Blobert", - address: - "0x00539f522b29ae9251dbf7443c7a950cf260372e69efab3710a11bf17a9599f1", - image: "/collections/c6fc5552-1051-4f68-87c9-fcd6ddc1f026.jpeg", - }, - { - name: "Grails", - address: - "0x02a819b93cc69b45ee5d1a1bfc16954c16f6d35c3873a06c97b95c009bfe502b", - image: "/collections/grail.png", - }, - { - name: "Starknet.id", - address: - "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af", - image: "/collections/59685ea9-aeae-4784-82a1-5aa9364cea9b.png", - }, - { - name: "Alter Nova", - address: - "0x0169e971d146ccf8f5e88f2b12e2e6099663fb56e42573479f2aee93309982f8", - image: "/collections/2024030811331141bb5ac7adfa420ab24b813ece99b01a.gif", - }, - { - name: "Starknet Quest", - address: - "0x076503062d78f4481be03c9145022d6a4a71ec0719aa07756f79a2384dc7ef16", - image: "/collections/fff43877-5668-4392-bced-f95f6faa8dd8.png", - }, - { - name: "Argent: Xplorer", - address: - "0x01b22f7a9d18754c994ae0ee9adb4628d414232e3ebd748c386ac286f86c3066", - image: "/collections/eee0d689-bf44-4a77-bdbe-eeeceb6d4b64.png", - }, - { - name: "carbonable - KARATHURU", - address: - "0x05a667adc04676fba78a29371561a0bf91dab25847d5dc4709a93a4cfb5ff293", - image: "/collections/carbonable.jpeg", - }, - { - name: "Flex storefront", - address: - "0x02e6c908da3d1ced80d81085ed9374b7c5048f86799e1f35e54daca4d70832d7", - image: "/collections/flex-store.png", - }, - { - name: "Flex evo", - address: - "0x04546729db564bb29a9e1e215463f41bc53116ac75eeb8e029b8a87fee7d85fd", - image: "/collections/flex-evo.jpg", - }, - { - name: "Influence asteroids", - address: - "0x0603cf837055c64d026a3c5a9e3a83036cea6c4a3f68a9e19f7a687d726fe817", - image: "/collections/influence.png", - }, - { - name: "Rise of the First LPs", - address: - "0x05b991e122ff2410d32575eb369059bd26cb69a05d15001a0c93f2678d96d81c", - image: "/collections/rise.webp", - }, - { - name: "Ventoria Crystals - Ruby Flame", - address: - "0x00125e36efcba872e578b6955ce08c686b10e1d22ac01de8eb5b2d51488f743a", - image: "/collections/ventory.png", - }, - { - name: "Mad ape club", - address: - "0x01335defa219c2d0911a75ff85245200932501d6975d6178eabfa544e7d82b07", - image: "/collections/mad-ape.png", - }, - { - name: "Pyramid store", - address: - "0x42e7815d9e90b7ea53f4550f74dc12207ed6a0faaef57ba0dbf9a66f3762d82", - image: "/collections/pyramid.png", - }, - { - name: "Lotus Project", - address: - "0x61ccf82a5628c0dbe3d0cc10e904882f1e9bc8adbb9456bdba155341bf430e5", - image: "/collections/lotus.webp", - }, - { - name: "Fibrous Arena", - address: - "0x1d2eac1bcddde10b595fd4e6247aa105ec69fef308c94fe612f435fe5798d19", - image: "/collections/fibrous.webp", - }, - { - name: "The starks", - address: - "0x0485209349294398d62ad18849b8ec0940ab7fe63117fb59eba2ab7446d78394", - image: "/collections/the-starks.webp", - }, - { - name: "Stonk", - address: - "0x076770d3d367bb07af81b9617216d1e1cf1fa1526104cb09686994825283090f", - image: "/collections/stonk.png", - }, - { - name: "Ventorians", - address: - "0x064f76d32edd460a30b4acf62bfb2e0e76f450d61994ab698224f0fe6ae72ee5", - image: "/collections/ventorians.png", - }, - { - name: "Dragark Genesis Collection", - address: - "0x051d0844f96f86c7363cc7eb3ab939e0ef5b70939dcbc17895b2fa178d9af420", - image: "/collections/dragark.png", - }, - { - name: "Starkguardians", - address: - "0x02d679a171589777bc996fb27767ff9a2e44c7e07967760dea3df31704ab398a", - image: "/collections/starguardians.webp", - }, - { - name: "Metacube: Genesis", - address: - "0x007ca74fd0a9239678cc6355e38ac1e7820141501727ae37f9c733e5ed1c3592", - image: "/collections/metacube-genesis.gif", - }, - { - name: "Dreambotty", - address: - "0x3859bf9178b48a4ba330d6872ab5a6d3895b64d6631197beefde6293bc172cd", - image: "/collections/dreambotty.webp", - }, - { - name: "The Crown of Stark", - address: - "0x041302e7d6c1329ceb18df33107ff285e3a46329f281aba2b0eb957240649760", - image: "/collections/6fe90ed7-7b32-4a0d-a42b-bc316873112c.jpg", - }, - { - name: "Dragark Element NFT", - address: - "0x0537fa10cefbb8ff7e61e86e950746809f95faa7398f250f0063069b29bb7933", - image: "/collections/1.png", - }, - { - name: "briq Sets", - address: - "0x01435498bf393da86b4733b9264a86b58a42b31f8d8b8ba309593e5c17847672", - image: "/collections/b0c8387c-08cf-4b7d-8c5a-4d743bfcc727.png", - }, - { - name: "Spok", - address: - "0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1", - image: "/collections/522ae053-3dfa-4305-8bbe-2381d581cb9b.png", - }, - { - name: "Starkurabu", - address: - "0x03ab1124ef9ec3a2f2b1d9838f9066f9a894483d40b33390dda8d85c01a315a3", - image: "/collections/7d9903ba-ec50-4474-b2b1-7eb4fbc264bd.png", - }, - { - name: "StarkRock", - address: - "0x012f8e318fe04a1fe8bffe005ea4bbd19cb77a656b4f42682aab8a0ed20702f0", - image: "/collections/f90e79fe-2477-461c-a4df-4f62c4134a33.png", - }, - { - name: "Focus Tree", - address: - "0x0377c2d65debb3978ea81904e7d59740da1f07412e30d01c5ded1c5d6f1ddc43", - image: "/collections/0cf88fb6-cbc4-416e-8fa7-1b8bcafc610b.png", - }, - { - name: "WeebPunks", - address: - "0x0507e93cecf4e2b5b5cc6a9131db8dffb17f32a8c7bd5fe1011baa290ed7dcbb", - image: "/collections/20240223224948e34066914831407683fa5aec15fffade.png", - }, - { - name: "Quantum Leap", - address: - "0x00b719f69b00a008a797dc48585449730aa1c09901fdbac1bc94b3bdc287cf76", - image: "/collections/54bae180-0516-4635-a249-6e2add00bc7e.png", - }, - { - name: "Starkpunks", - address: - "0x0727a63f78ee3f1bd18f78009067411ab369c31dece1ae22e16f567906409905", - image: "/collections/13041814-9ee2-4d22-b060-ad6de5a3dedc.webp", - }, - { - name: "Ducks Everywhere", - address: - "0x04fa864a706e3403fd17ac8df307f22eafa21b778b73353abf69a622e47a2003", - image: "/collections/46a33d89-7a73-46a9-93f1-ccca5e386332.png", - }, - { - name: "Metacube: Passcards", - address: - "0x0602c301f6a1c2ef174bafaab7389c3f6165df34736befcf2ca3df7764934caf", - image: "/collections/20240602033225e51b51e85e60446eaa5f53421b0ebd98.gif", - }, -]; +export const homepageConfig = { + latestDropCollections: [ + { name: "Collection name" }, + { name: "Collection name" }, + { name: "Collection name" }, + { name: "Collection name" }, + ], + trendingCollections: [ + { + name: "Grails", + address: + "0x02a819b93cc69b45ee5d1a1bfc16954c16f6d35c3873a06c97b95c009bfe502b", + image: "/collections/grail.png", + }, + { + name: "Starknet Quest", + address: + "0x076503062d78f4481be03c9145022d6a4a71ec0719aa07756f79a2384dc7ef16", + image: "/collections/fff43877-5668-4392-bced-f95f6faa8dd8.png", + }, + { + name: "Argent: Xplorer", + address: + "0x01b22f7a9d18754c994ae0ee9adb4628d414232e3ebd748c386ac286f86c3066", + image: "/collections/eee0d689-bf44-4a77-bdbe-eeeceb6d4b64.png", + }, + { + name: "Starknet.id", + address: + "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af", + image: "/collections/59685ea9-aeae-4784-82a1-5aa9364cea9b.png", + }, + ], + exploreCollections: [ + { + name: "Everai", + address: + "0x02acee8c430f62333cf0e0e7a94b2347b5513b4c25f699461dd8d7b23c072478", + image: "/collections/everai.png", + banner_image: "/banners/everai.png", + }, + { + name: "Starkurabu", + address: + "0x03ab1124ef9ec3a2f2b1d9838f9066f9a894483d40b33390dda8d85c01a315a3", + image: "/collections/7d9903ba-ec50-4474-b2b1-7eb4fbc264bd.png", + banner_image: "/banners/starkurabu.png", + }, + { + name: "Blobert", + address: + "0x00539f522b29ae9251dbf7443c7a950cf260372e69efab3710a11bf17a9599f1", + image: "/collections/c6fc5552-1051-4f68-87c9-fcd6ddc1f026.jpeg", + banner_image: "/banners/blobert.png", + }, + { + name: "Ducks Everywhere", + address: + "0x04fa864a706e3403fd17ac8df307f22eafa21b778b73353abf69a622e47a2003", + image: "/collections/46a33d89-7a73-46a9-93f1-ccca5e386332.png", + banner_image: "/banners/ducks.png", + }, + { + name: "briq Sets", + address: + "0x01435498bf393da86b4733b9264a86b58a42b31f8d8b8ba309593e5c17847672", + image: "/collections/b0c8387c-08cf-4b7d-8c5a-4d743bfcc727.png", + banner_image: "/banners/briq.png", + }, + { + name: "Alter Nova", + address: + "0x0169e971d146ccf8f5e88f2b12e2e6099663fb56e42573479f2aee93309982f8", + image: "/collections/2024030811331141bb5ac7adfa420ab24b813ece99b01a.gif", + banner_image: "/banners/alternova.png", + }, + { + name: "Grails", + address: + "0x02a819b93cc69b45ee5d1a1bfc16954c16f6d35c3873a06c97b95c009bfe502b", + image: "/collections/grail.png", + }, + { + name: "Argent: Xplorer", + address: + "0x01b22f7a9d18754c994ae0ee9adb4628d414232e3ebd748c386ac286f86c3066", + image: "/collections/eee0d689-bf44-4a77-bdbe-eeeceb6d4b64.png", + }, + { + name: "Carbonable - KARATHURU", + address: + "0x05a667adc04676fba78a29371561a0bf91dab25847d5dc4709a93a4cfb5ff293", + image: "/collections/carbonable.jpeg", + }, + { + name: "Flex storefront", + address: + "0x02e6c908da3d1ced80d81085ed9374b7c5048f86799e1f35e54daca4d70832d7", + image: "/collections/flex-store.png", + }, + { + name: "Flex evo", + address: + "0x04546729db564bb29a9e1e215463f41bc53116ac75eeb8e029b8a87fee7d85fd", + image: "/collections/flex-evo.jpg", + }, + { + name: "Influence asteroids", + address: + "0x0603cf837055c64d026a3c5a9e3a83036cea6c4a3f68a9e19f7a687d726fe817", + image: "/collections/influence.png", + }, + { + name: "Rise of the First LPs", + address: + "0x05b991e122ff2410d32575eb369059bd26cb69a05d15001a0c93f2678d96d81c", + image: "/collections/rise.webp", + }, + { + name: "Ventoria Crystals - Ruby Flame", + address: + "0x00125e36efcba872e578b6955ce08c686b10e1d22ac01de8eb5b2d51488f743a", + image: "/collections/ventory.png", + }, + { + name: "Mad ape club", + address: + "0x01335defa219c2d0911a75ff85245200932501d6975d6178eabfa544e7d82b07", + image: "/collections/mad-ape.png", + }, + { + name: "Pyramid store", + address: + "0x42e7815d9e90b7ea53f4550f74dc12207ed6a0faaef57ba0dbf9a66f3762d82", + image: "/collections/pyramid.png", + }, + { + name: "Lotus Project", + address: + "0x61ccf82a5628c0dbe3d0cc10e904882f1e9bc8adbb9456bdba155341bf430e5", + image: "/collections/lotus.webp", + }, + { + name: "Fibrous Arena", + address: + "0x1d2eac1bcddde10b595fd4e6247aa105ec69fef308c94fe612f435fe5798d19", + image: "/collections/fibrous.webp", + }, + { + name: "The starks", + address: + "0x0485209349294398d62ad18849b8ec0940ab7fe63117fb59eba2ab7446d78394", + image: "/collections/the-starks.webp", + }, + { + name: "Stonk", + address: + "0x076770d3d367bb07af81b9617216d1e1cf1fa1526104cb09686994825283090f", + image: "/collections/stonk.png", + }, + { + name: "Ventorians", + address: + "0x064f76d32edd460a30b4acf62bfb2e0e76f450d61994ab698224f0fe6ae72ee5", + image: "/collections/ventorians.png", + }, + { + name: "Dragark Genesis Collection", + address: + "0x051d0844f96f86c7363cc7eb3ab939e0ef5b70939dcbc17895b2fa178d9af420", + image: "/collections/dragark.png", + }, + { + name: "Starkguardians", + address: + "0x02d679a171589777bc996fb27767ff9a2e44c7e07967760dea3df31704ab398a", + image: "/collections/starguardians.webp", + }, + { + name: "Metacube: Genesis", + address: + "0x007ca74fd0a9239678cc6355e38ac1e7820141501727ae37f9c733e5ed1c3592", + image: "/collections/metacube-genesis.gif", + }, + { + name: "Dreambotty", + address: + "0x3859bf9178b48a4ba330d6872ab5a6d3895b64d6631197beefde6293bc172cd", + image: "/collections/dreambotty.webp", + }, + { + name: "The Crown of Stark", + address: + "0x041302e7d6c1329ceb18df33107ff285e3a46329f281aba2b0eb957240649760", + image: "/collections/6fe90ed7-7b32-4a0d-a42b-bc316873112c.jpg", + }, + { + name: "Dragark Element NFT", + address: + "0x0537fa10cefbb8ff7e61e86e950746809f95faa7398f250f0063069b29bb7933", + image: "/collections/1.png", + }, + { + name: "Spok", + address: + "0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1", + image: "/collections/522ae053-3dfa-4305-8bbe-2381d581cb9b.png", + }, + { + name: "Starkurabu", + address: + "0x03ab1124ef9ec3a2f2b1d9838f9066f9a894483d40b33390dda8d85c01a315a3", + image: "/collections/7d9903ba-ec50-4474-b2b1-7eb4fbc264bd.png", + }, + { + name: "StarkRock", + address: + "0x012f8e318fe04a1fe8bffe005ea4bbd19cb77a656b4f42682aab8a0ed20702f0", + image: "/collections/f90e79fe-2477-461c-a4df-4f62c4134a33.png", + }, + { + name: "Focus Tree", + address: + "0x0377c2d65debb3978ea81904e7d59740da1f07412e30d01c5ded1c5d6f1ddc43", + image: "/collections/0cf88fb6-cbc4-416e-8fa7-1b8bcafc610b.png", + }, + { + name: "WeebPunks", + address: + "0x0507e93cecf4e2b5b5cc6a9131db8dffb17f32a8c7bd5fe1011baa290ed7dcbb", + image: "/collections/20240223224948e34066914831407683fa5aec15fffade.png", + }, + { + name: "Quantum Leap", + address: + "0x00b719f69b00a008a797dc48585449730aa1c09901fdbac1bc94b3bdc287cf76", + image: "/collections/54bae180-0516-4635-a249-6e2add00bc7e.png", + }, + { + name: "Starkpunks", + address: + "0x0727a63f78ee3f1bd18f78009067411ab369c31dece1ae22e16f567906409905", + image: "/collections/13041814-9ee2-4d22-b060-ad6de5a3dedc.webp", + }, + { + name: "Metacube: Passcards", + address: + "0x0602c301f6a1c2ef174bafaab7389c3f6165df34736befcf2ca3df7764934caf", + image: "/collections/20240602033225e51b51e85e60446eaa5f53421b0ebd98.gif", + }, + ], +}; From fa9a959968e35f56c932ea60580b2c8c71d26dc9 Mon Sep 17 00:00:00 2001 From: Yohan Tancrez Date: Fri, 28 Jun 2024 03:35:24 +0200 Subject: [PATCH 13/15] feat: header disappearing on token page --- apps/arkmarket/src/components/site-header.tsx | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/apps/arkmarket/src/components/site-header.tsx b/apps/arkmarket/src/components/site-header.tsx index 1fd4a4af..9d20fcdf 100644 --- a/apps/arkmarket/src/components/site-header.tsx +++ b/apps/arkmarket/src/components/site-header.tsx @@ -1,5 +1,11 @@ +"use client"; + import * as React from "react"; +import { useState } from "react"; +import { usePathname } from "next/navigation"; +import { useMotionValueEvent, useScroll } from "framer-motion"; +import { cn } from "@ark-market/ui"; import { Input } from "@ark-market/ui/input"; // import { ThemeToggle } from "@ark-market/ui/theme"; @@ -9,8 +15,27 @@ import { MainNav } from "~/components/main-nav"; import { UserNav } from "~/components/user-nav"; export default function SiteHeader() { + const pathname = usePathname(); + const isTokenPage = pathname.includes("token/"); + const [showHeader, setShowHeader] = useState(false); + + const { scrollY } = useScroll(); + useMotionValueEvent(scrollY, "change", (latest) => { + if (latest > 60 && showHeader) { + setShowHeader(false); + } else if (latest <= 60 && !showHeader) { + setShowHeader(true); + } + }); return ( -
+
{/* */} From 08eacf89997570e712ce2357667fc8e852a6a44f Mon Sep 17 00:00:00 2001 From: Yohan Tancrez Date: Fri, 28 Jun 2024 03:37:34 +0200 Subject: [PATCH 14/15] fix: header show on page load --- apps/arkmarket/src/components/site-header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/arkmarket/src/components/site-header.tsx b/apps/arkmarket/src/components/site-header.tsx index 9d20fcdf..3dc9bccd 100644 --- a/apps/arkmarket/src/components/site-header.tsx +++ b/apps/arkmarket/src/components/site-header.tsx @@ -17,7 +17,7 @@ import { UserNav } from "~/components/user-nav"; export default function SiteHeader() { const pathname = usePathname(); const isTokenPage = pathname.includes("token/"); - const [showHeader, setShowHeader] = useState(false); + const [showHeader, setShowHeader] = useState(true); const { scrollY } = useScroll(); useMotionValueEvent(scrollY, "change", (latest) => { From 280a5ff11689f6260a1803a924059a1296382fb8 Mon Sep 17 00:00:00 2001 From: Yohan Tancrez Date: Fri, 28 Jun 2024 03:49:20 +0200 Subject: [PATCH 15/15] home page --- apps/arkmarket/src/app/page.tsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/apps/arkmarket/src/app/page.tsx b/apps/arkmarket/src/app/page.tsx index c3c172ef..0f608dcd 100644 --- a/apps/arkmarket/src/app/page.tsx +++ b/apps/arkmarket/src/app/page.tsx @@ -167,6 +167,28 @@ export default function HomePage() {
)} + +
+
+
+
+

Need help?

+

Lorem ipsum...

+ +
+
+ +
+
+
+

+ Get your collection verified +

+

Lorem ipsum...

+ +
+
+
);