Skip to content

Commit

Permalink
feat: bump version + maintenance page
Browse files Browse the repository at this point in the history
  • Loading branch information
MartianGreed committed Dec 5, 2024
1 parent ec8f62a commit 312f1ce
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 36 deletions.
4 changes: 1 addition & 3 deletions apps/arkmarket/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
"@ark-market/ui": "workspace:*",
"@ark-project/core": "^2.1.2",
"@ark-project/react": "^1.1.2",
"@cartridge/connector": "^0.3.43",
"@ark-project/core": "^2.1.1",
"@ark-project/react": "^1.1.1",
"@avnu/avnu-sdk": "^2.1.1",
"@cartridge/connector": "^0.3.43",
"@hookform/error-message": "^2.0.1",
"@starknet-react/chains": "^0.1.7",
"@starknet-react/core": "^2.9.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"use client";

import { useState } from "react";
import moment from "moment";

import { cn, focusableStyles } from "@ark-market/ui";
import {
Collapsible,
Expand All @@ -22,6 +20,8 @@ import CopyButton from "~/components/copy-button";
import ExternalLink from "~/components/external-link";
import useCollection from "~/hooks/useCollection";
import CollectionHeaderStats from "./collection-header-stats";
import { CollectionDescription, homepageConfig } from "~/config/homepage";
import { siteConfig } from "~/config/site";

interface CollectionHeaderProps {
collectionAddress: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import CollectionBanner from "./components/collection-banner";
import CollectionHeader from "./components/collection-header";
import CollectionItems from "./components/collection-items";
import MobileCollectionHeader from "./components/mobile-collection-header";
import { CollectionDescription } from "~/config/homepage";
import { ChainId, CollectionAddresses, CollectionDescription, Collections } from "~/config/homepage";
import { Maintenance } from "~/app/components/maintenance";

interface GenerateMetadataProps {
params: Promise<{ collectionAddress: string }>;
Expand Down Expand Up @@ -47,6 +48,9 @@ export default async function CollectionPage({ params }: CollectionPageProps) {
return notFound();
}

if (CollectionAddresses[Collections.ETERNUMSEASONPASS][ChainId.SN_MAIN] === collectionAddress) {
return <Maintenance />
}
return (
<div className="flex min-h-[calc(100vh-var(--site-header-height))] flex-col">
<CollectionBanner
Expand All @@ -67,3 +71,5 @@ export default async function CollectionPage({ params }: CollectionPageProps) {
/>
</div>);
}


10 changes: 10 additions & 0 deletions apps/arkmarket/src/app/components/maintenance.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export function Maintenance() {
return (
<main className="flex h-[calc(100vh-var(--site-header-height)-var(--site-footer-height))] items-center justify-center">
<h1 className="text-6xl font-semibold">
Under active maintenance
<small className="block text-sm text-muted-foreground font-mono">Team is working hard, you can reach us out on discord</small>
</h1>
</main>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,11 @@ interface TokenActionsPriceProps {
export default function TokenActionsPrice({
tokenMarketData,
}: TokenActionsPriceProps) {
const { convertInUsd } = usePrices();
const amountHex = isListed ? startAmount : topOffer.amount;
const amount = formatEther(BigInt(amountHex ?? 0));
const amountInUsd = convertInUsd({ token: "lords", amount: BigInt(amountHex ?? 0) });
// const { convertInUsd } = usePrices();
// const amountHex = isListed ? startAmount : topOffer.amount;
// const amount = formatEther(BigInt(amountHex ?? 0));
// const amountInUsd = convertInUsd({ token: "lords", amount: BigInt(amountHex ?? 0) });

let label = "Best offer";

if (isListed) {
if (isAuction) {
label = "Minimum starting price";
} else {
label = "Current Price";
}
}
const label = tokenMarketData.is_listed
? tokenMarketData.listing.is_auction
? "Minimum starting price"
Expand All @@ -52,7 +43,6 @@ export default function TokenActionsPrice({
ellipsableStyles,
)}
>
{amount} LORDS
{amountFormatted} {currency.symbol}
</div>
<div className="text-lg font-semibold leading-none text-muted-foreground lg:text-2xl">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,8 @@ import { notFound } from "next/navigation";
import { Suspense } from "react";
import { TokenPageDetails, TokenPageDetailsSkeleton } from "./components/token-page-details";
import { CollectionDescription } from "~/config/homepage";
import type { Token, TokenMarketData } from "~/types";
import { env } from "~/env";
import getToken from "~/lib/getToken";
import getTokenMarketData from "~/lib/getTokenMarketData";
import TokenAbout from "./components/token-about";
import TokenActions from "./components/token-actions";
import TokenActivity from "./components/token-activity";
import TokenOffers from "./components/token-offers";
import TokenStats from "./components/token-stats";
import TokenSummary from "./components/token-summary";
import TokenTraits from "./components/token-traits";

interface GenerateMetadataProps {
params: { contractAddress: string; tokenId: string };
Expand Down Expand Up @@ -58,13 +49,7 @@ export default async function TokenPage({
}

return (
<main className="mx-auto max-w-[120rem] p-5 pt-0 lg:p-8">
<div className="grid grid-cols-1 gap-5 lg:grid-cols-[minmax(0,1fr)_minmax(0,2fr)] lg:gap-8">
<TokenSummary
className="top-[calc(var(--site-header-height)+2rem)] h-fit lg:sticky"
token={token}
/>
</head>
<>
<Suspense fallback={<TokenPageDetailsSkeleton />}>
<TokenPageDetails
contractAddress={contractAddress}
Expand Down

0 comments on commit 312f1ce

Please sign in to comment.