Skip to content

Commit

Permalink
feat: add jokers of neon collection
Browse files Browse the repository at this point in the history
  • Loading branch information
MartianGreed committed Nov 7, 2024
1 parent 9484a7e commit e0d217d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
Binary file added apps/arkmarket/public/banners/jokersofneon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type { Collection } from "~/types";
import CopyButton from "~/components/copy-button";
import ExternalLink from "~/components/external-link";
import CollectionHeaderStats from "./collection-header-stats";
import { CollectionDescription } from "~/config/homepage";
import { CollectionDescription, homepageConfig } from "~/config/homepage";
import { useQuery } from "@tanstack/react-query";
import getCollection from "~/lib/getCollection";

Expand All @@ -36,13 +36,15 @@ export default function CollectionHeader({
}: CollectionHeaderProps) {
const [collapsibleOpen, setCollapsibleOpen] = useState(false);

const { data } = useCollection({ address:collectionAddress })
const { data } = useCollection({ address: collectionAddress })


const description = CollectionDescription[collection.address];
const collectionConfig = homepageConfig.mainCarousel.find((collection) => collection.address === collectionAddress)
if (!data || !description) {
return null;
}
const image = data.image || collectionConfig?.collectionSrc || null;

return (
<div className="hidden lg:block">
Expand All @@ -53,9 +55,9 @@ export default function CollectionHeader({
>
<div className="flex h-full items-center justify-between gap-0">
<div className="flex h-[3.875rem] flex-shrink-0 items-center gap-4 transition-[height]">
{data.image ? (
{image ? (
<img
src={data.image}
src={image}
className="aspect-square h-full flex-shrink-0 rounded-lg"
alt={data.name}
/>
Expand Down Expand Up @@ -110,11 +112,11 @@ export default function CollectionHeader({
<p className="flex items-center gap-2 pt-8">
Created

{}
{ }
<span className="text-muted-foreground"> {description.created}</span>
</p>
<p className="max-w-lg pt-4 text-sm">
{}
{ }
{description.description}
</p>
<div className="block lg:hidden">
Expand Down
29 changes: 28 additions & 1 deletion apps/arkmarket/src/config/homepage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export enum Collections {
SYNDICATE = "syndicate",
DUNGEON_DUCKS = "dungeonducks",
KARAT = "karat",
JOKERSOFNEON = "jokersofneon",
}

export enum ChainId {
Expand Down Expand Up @@ -80,7 +81,11 @@ export const CollectionAddresses: {
[ChainId.SN_MAIN]:
"0x07d8ea58612a5de25f29281199a4fc1f2ce42f0f207f93c3a35280605f3b8e68",
[ChainId.SN_SEPOLIA]: "",

},
[Collections.JOKERSOFNEON]: {
[ChainId.SN_MAIN]:
"0x07268fcf96383f8691b91ba758cc8fefe0844146f0557909345b841fb1de042f",
[ChainId.SN_SEPOLIA]: "",
},
};

Expand All @@ -94,6 +99,7 @@ export const CollectionNames = {
[Collections.SYNDICATE]: "Syndicate",
[Collections.DUNGEON_DUCKS]: "Dungeon Ducks",
[Collections.KARAT]: "Karat",
[Collections.JOKERSOFNEON]: "Jokers of Neon x Loot Survivor: Beasts",
};

interface CollectionDescription {
Expand Down Expand Up @@ -156,6 +162,12 @@ export const CollectionDescription: Record<string, CollectionDescription> = {
description:
"Karats are composable gems discovered under the Realms. A fully on-chain generative art collection made with Dojo.",
},
// @ts-expect-error It's ok compiler
[CollectionAddresses[Collections.JOKERSOFNEON][ChainId.SN_MAIN]]: {
created: "2024",
description:
"Jokers of Neon mod exclusive collection",
},
};

export const homepageConfig = {
Expand Down Expand Up @@ -214,6 +226,15 @@ export const homepageConfig = {
itemsCount: 512,
// floorPrice: 0.12,
},
{
bannerSrc: "/banners/jokersofneon.png",
collectionSrc: "/collections/jokersofneon.png",
name: CollectionNames[Collections.JOKERSOFNEON],
description: "Jokers of Neon mod exclusive collection",
address: CollectionAddresses[Collections.JOKERSOFNEON][ChainId.SN_MAIN],
itemsCount: 2,
// floorPrice: 0.12,
},
],
exploreCategory: [
{ name: "Gaming", image: "/collection_categories/gaming.png" },
Expand Down Expand Up @@ -288,6 +309,12 @@ export const homepageConfig = {
image: "/collections/karat.png",
banner_image: "/banners/karat.png",
},
{
name: CollectionNames[Collections.JOKERSOFNEON],
address: CollectionAddresses[Collections.JOKERSOFNEON][ChainId.SN_MAIN],
image: "/collections/jokersofneon.png",
banner_image: "/banners/jokersofneon.png",
},
],
liveAuctions: [],
latestSales: [
Expand Down

0 comments on commit e0d217d

Please sign in to comment.