From ec3cacd51f0af89c67cd4cde7503ea5341b1c933 Mon Sep 17 00:00:00 2001 From: Oleg Akbarov Date: Fri, 2 Dec 2022 15:24:24 -0800 Subject: [PATCH 01/17] redirects and renames --- .../V3Ask/create/V3AskCreateSuccess.tsx | 2 +- @media/NFTCard/NFTCard.tsx | 4 +- .../components/ActiveAuction/RPCTokenInfo.tsx | 6 +- .../components/ActiveAuctionCard.tsx | 2 +- @shared/components/CollectionLink.tsx | 2 +- @shared/hooks/useTokenHelper.ts | 4 +- components/HomepageExplore.tsx | 2 +- .../CollectionMenu/CollectionLink.tsx | 2 +- compositions/CollectionRanking/RankingRow.tsx | 2 +- compositions/Daos/DaoRow.tsx | 4 +- compositions/NFTPage/NFTSidebar.tsx | 2 +- next.config.js | 15 + .../[address]/[tokenId].tsx | 0 .../{collections => daos}/[address]/index.tsx | 0 pages/{collections => daos}/index.tsx | 0 pages/docs/index.tsx | 90 -- pages/docs/nounish-auction-component.tsx | 128 --- pages/docs/zord-components.tsx | 819 ------------------ 18 files changed, 31 insertions(+), 1053 deletions(-) rename pages/{collections => daos}/[address]/[tokenId].tsx (100%) rename pages/{collections => daos}/[address]/index.tsx (100%) rename pages/{collections => daos}/index.tsx (100%) delete mode 100644 pages/docs/index.tsx delete mode 100644 pages/docs/nounish-auction-component.tsx delete mode 100644 pages/docs/zord-components.tsx diff --git a/@market/modules/V3Ask/create/V3AskCreateSuccess.tsx b/@market/modules/V3Ask/create/V3AskCreateSuccess.tsx index 3758f04e..9814601a 100644 --- a/@market/modules/V3Ask/create/V3AskCreateSuccess.tsx +++ b/@market/modules/V3Ask/create/V3AskCreateSuccess.tsx @@ -30,7 +30,7 @@ export function V3AskCreateSuccess({ ...props }: V3AskCreateSuccessProps) { const { nft } = nftObj - const askURL = `https://noun.market/collections/${nft?.contract.address}/${nft?.tokenId}` + const askURL = `https://noun.market/daos/${nft?.contract.address}/${nft?.tokenId}` const [_, copied, copy] = useCopyToClipboard(askURL) const { toastDispatch } = useToast() const { state } = useV3AskStateContext() diff --git a/@media/NFTCard/NFTCard.tsx b/@media/NFTCard/NFTCard.tsx index dd50b6c8..43d27f20 100644 --- a/@media/NFTCard/NFTCard.tsx +++ b/@media/NFTCard/NFTCard.tsx @@ -58,7 +58,7 @@ export function NFTCardComponent({ return ( - + {collectionAddress && tokenId && } @@ -76,7 +76,7 @@ export function NFTCardComponent({ - + - + diff --git a/@shared/hooks/useTokenHelper.ts b/@shared/hooks/useTokenHelper.ts index 0ae9bab2..5427aa91 100644 --- a/@shared/hooks/useTokenHelper.ts +++ b/@shared/hooks/useTokenHelper.ts @@ -33,12 +33,12 @@ export function useTokenHelper(nftObj: NFTObject) { }, [nftCount, tokenID, isFirstTokenIDZero]) const handlePrev = useCallback(() => { - tokenID && router.push(`/collections/${nft?.contract.address}/${tokenID - 1}`) + tokenID && router.push(`/daos/${nft?.contract.address}/${tokenID - 1}`) }, [nft?.contract.address, tokenID, router]) const handleNext = useCallback(() => { if (hasNextNFT) { - tokenID && router.push(`/collections/${nft?.contract.address}/${tokenID + 1}`) + tokenID && router.push(`/daos/${nft?.contract.address}/${tokenID + 1}`) } }, [hasNextNFT, tokenID, router, nft?.contract.address]) diff --git a/components/HomepageExplore.tsx b/components/HomepageExplore.tsx index 7e704f57..527bfbe7 100644 --- a/components/HomepageExplore.tsx +++ b/components/HomepageExplore.tsx @@ -5,7 +5,7 @@ import { Link } from './Link' export function HomepageExplore() { return ( - + + - + - + @@ -153,7 +153,7 @@ export const DaoRowComponent = ({ - + diff --git a/compositions/NFTPage/NFTSidebar.tsx b/compositions/NFTPage/NFTSidebar.tsx index b8c52095..9a29f595 100644 --- a/compositions/NFTPage/NFTSidebar.tsx +++ b/compositions/NFTPage/NFTSidebar.tsx @@ -62,7 +62,7 @@ export function NFTSidebarComponent({ {...props} > - + { - return { - id: item, - label: item, - } -}) - -export default function TestPages() { - const [tab, setTab] = useState(menuItems[0].id) - - return ( - - - - {tab === tabs.ABOUT && } - {/*tab === tabs.ZORA_COMMON && ( - - )*/} - {tab === tabs.ZORA_MARKET && ( - - )} - {tab === tabs.ZORD && } - {tab === tabs.NFT_FILTER && } - {tab === tabs.EXAMPLES && ( - - {pageLinks.map((link) => ( - - - - ))} - - )} - - - ) -} diff --git a/pages/docs/nounish-auction-component.tsx b/pages/docs/nounish-auction-component.tsx deleted file mode 100644 index fa4c2390..00000000 --- a/pages/docs/nounish-auction-component.tsx +++ /dev/null @@ -1,128 +0,0 @@ -import { DocsPageWrapper } from 'components' -import { daos } from 'constants/collection-addresses' - -import { NounishAuction } from '@noun-auction' -import { Grid, Heading, Stack } from '@zoralabs/zord' - -export default function NounsAuctionHistory() { - return ( - - - {/* {daos.map((dao) => { - return ( - - ) - })} */} - - - - Completed Nouns auction - {/* */} - - - Completed LilNouns auction - {/* */} - - - - - Nouns No Auction: Winner nounders.eth - {/* */} - - - LilNouns No Auction: Winner lilnounders.eth - {/* - */} - - - - Nouns Auction History - {/* */} - - - ) -} diff --git a/pages/docs/zord-components.tsx b/pages/docs/zord-components.tsx deleted file mode 100644 index 2ead2c7f..00000000 --- a/pages/docs/zord-components.tsx +++ /dev/null @@ -1,819 +0,0 @@ -import { DocsPageWrapper, HorizontalMenu, MDXComponents } from 'components' - -import { useState } from 'react' - -import { - Accordion, - Box, - Button, - Checkbox, - Display, - Eyebrow, - Flex, - Heading, - Icon, - Input, - InputField, - Label, - MenuText, - Modal, - ModalContent, - Paragraph, - PopUp, - RadioButtonGroup, - Select, - Slider, - Spinner, - SpinnerOG, - Stack, - Switch, - Tag, - Text, - TextArea, - Well, - color, -} from '@zoralabs/zord' - -import ZordMarkup from '../../docs/zordMarkup.md' - -enum tabs { - COMPONENTS = 'Components', - MARKUP = 'Markup', -} - -const menuItems = Object.values(tabs).map((item) => { - return { - id: item, - label: item, - } -}) - -export default function NounsAuctionHistory() { - const [tab, setTab] = useState(menuItems[0].id) - - return ( - - - {tab === tabs.MARKUP && } - {tab === tabs.COMPONENTS && ( - - - - - - - - - - - - - - - - - - - - - xox - - - xox - - - xox - - - xox - - - xox - - - xox - - - - - - Display - Display lg - Display md - Display sm - Heading xs - - - - Headings - Heading xl - Heading lg - Heading md - Heading sm - Heading xs - - - Labels - - - - - - - Paragraphs - Paragraph lg - Paragraph md - Paragraph sm - Paragraph xs - - - MenuText - MenuText - - - Eyebrow - - - Responsive Text - - Custom size which gets smaller at 576px breakpoint - - - - - - - - - - - - - - - Small - - - - Large - - - {/* - - Flipped - - - */} - - - - ArrowRight - - - - ArrowRightAngle - - - - Auction - - - - Bell - - - - Check - - - - ChevronDown - - - - ChevronLeft - - - - ChevronRight - - - - ChevronUp - - - - Close - - - - Coinbase - - - - Copy - - - - Create - - - - Discord - - - - Download - - - - Ellipsis - - - - Embed - - - - Instagram - - - - Kebab - - - - Logout - - - - Metamask - - - - Pencil - - - - Plus - - - - Question - - - - Rainbow - - - - Search - - - - Shield - - - - Spinner - - - - Tag - - - - Twitter - - - - WalletConnect - - - - Warning - - - - - - - Primary - - - - - - - - Secondary - - - - - - - - Outline - - - - - - - - - Circle - - - - - - - - Ghost - - - - - - - - Pill Primary - - - - - - - - Pill Outline - - - - - - - Inherit currentColor - - - - - - - Size: md - - Size: lg - - - - - Size: 20 - - Size: 50 - - - - - - - Base Input - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -