Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirects and renames #149

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion @market/modules/V3Ask/create/V3AskCreateSuccess.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions @media/NFTCard/NFTCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function NFTCardComponent({

return (
<Stack w="100%" position="relative" overflow="hidden" className={cardWrapper}>
<Link href={`/collections/${collectionAddress}/${tokenId}`}>
<Link href={`/daos/${collectionAddress}/${tokenId}`}>
<Box w="100%" className={cardImageWrapper} backgroundColor="background2">
{collectionAddress && tokenId && <ImageWithNounFallback token={token} />}
</Box>
Expand All @@ -76,7 +76,7 @@ export function NFTCardComponent({
</Heading>
</Flex>
<Flex align="center" gap="x2" justify="space-between">
<Link href={`/collections/${collectionAddress}`}>
<Link href={`/daos/${collectionAddress}`}>
<Flex align="center" gap="x2">
<CollectionThumbnail
collectionAddress={collectionAddress}
Expand Down
6 changes: 3 additions & 3 deletions @noun-auction/components/ActiveAuction/RPCTokenInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function RPCTokenInfo({
}: RPCTokenInfoProps) {
return (
<Flex className={['nounish-auction__token-info', styles.tokenInfoWrapper]} {...props}>
<NextLink href={`/collections/${collectionAddress}/${tokenId}`} passHref>
<NextLink href={`/daos/${collectionAddress}/${tokenId}`} passHref>
<Button as="a" variant="unset" className={styles.thumbnailLink}>
{!!tokenId && !!collectionAddress && (
<NounishThumbnail
Expand All @@ -38,13 +38,13 @@ export function RPCTokenInfo({
<Stack justify="space-around">
<Box>
<Box className={styles.rowCollectionName}>
<Link href={`/collections/${collectionAddress}`} passHref>
<Link href={`/daos/${collectionAddress}`} passHref>
{`${collectionName} #${tokenId}` ?? '...'}
</Link>
</Box>
<Box mt="x1">
<Label as="a" color="tertiary" className={[lightFont]}>
<Link href={`/collections/${collectionAddress}`} passHref>
<Link href={`/daos/${collectionAddress}`} passHref>
{collectionName ?? '...'}
</Link>
</Label>
Expand Down
2 changes: 1 addition & 1 deletion @noun-auction/components/ActiveAuctionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function ActiveAuctionCardComponent({
className={cardWrapper}
style={{ maxWidth: '500px' }}
>
<Link href={`/collections/${collectionAddress}/${tokenId}`}>
<Link href={`/daos/${collectionAddress}/${tokenId}`}>
<Box w="100%" className={cardImageWrapper} backgroundColor="tertiary">
<ImageWithNounFallback token={token} />
</Box>
Expand Down
2 changes: 1 addition & 1 deletion @shared/components/CollectionLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function CollectionLink({
...props
}: CollectionLinkProps) {
return (
<NextLink passHref href={`/collections/${contractAddress}`}>
<NextLink passHref href={`/daos/${contractAddress}`}>
<Button as="a" {...props}>
{children}
</Button>
Expand Down
4 changes: 2 additions & 2 deletions @shared/hooks/useTokenHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
2 changes: 1 addition & 1 deletion components/HomepageExplore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Link } from './Link'
export function HomepageExplore() {
return (
<Flex w="100%" justify="center">
<Link href="/collections">
<Link href="/daos">
<Flex
align="center"
borderRadius="curved"
Expand Down
2 changes: 1 addition & 1 deletion compositions/CollectionMenu/CollectionLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function CollectionLink({ collection }: { collection: TypeSafeDao }) {
const { isSmall } = useWindowWidth()

return (
<Link href={`/collections/${collection.collectionAddress}`} passHref>
<Link href={`/daos/${collection.collectionAddress}`} passHref>
<Flex align="center" justify="space-between" gap="x4" onClick={requestClose}>
<Flex align="center" gap="x4">
<CollectionThumbnail
Expand Down
2 changes: 1 addition & 1 deletion compositions/CollectionRanking/RankingRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function RankingRow({ collection, ...props }: RankingRowProps) {

return (
<Stack {...props}>
<Link href={`/collections/${collection.address}`} passHref>
<Link href={`/daos/${collection.address}`} passHref>
<Grid className={[rankingRow]}>
<Flex className={[rankingRowInfo, 'collection-row__collection-info']}>
<CollectionThumbnail
Expand Down
4 changes: 2 additions & 2 deletions compositions/Daos/DaoRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const DaoRowComponent = ({
cursor="pointer"
/>
<Box>
<Link href={`/collections/${collectionAddress}`} passHref>
<Link href={`/daos/${collectionAddress}`} passHref>
<Button variant="secondary" as="a">
View
</Button>
Expand Down Expand Up @@ -153,7 +153,7 @@ export const DaoRowComponent = ({
<EthAmount ethAmount={highestBid} />
</Box>
</Box>
<Link href={`/collections/${collectionAddress}`} passHref>
<Link href={`/daos/${collectionAddress}`} passHref>
<Button variant="secondary" as="a">
View
</Button>
Expand Down
2 changes: 1 addition & 1 deletion compositions/NFTPage/NFTSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function NFTSidebarComponent({
{...props}
>
<Flex>
<Link href={`/collections/${token.collectionAddress}`}>
<Link href={`/daos/${token.collectionAddress}`}>
<CollectionThumbnail
collectionAddress={token.collectionAddress}
showTitle
Expand Down
15 changes: 15 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ const nextConfig = {
// esmExternals: false,
// },

async redirects() {
return [
{
source: '/collections',
destination: '/',
permanent: true,
},
{
source: '/collections/:address*',
destination: '/daos/:address*',
permanent: true,
},
]
},

images: {
domains: [
// For debugging images
Expand Down
File renamed without changes.
File renamed without changes.
90 changes: 0 additions & 90 deletions pages/docs/index.tsx

This file was deleted.

128 changes: 0 additions & 128 deletions pages/docs/nounish-auction-component.tsx

This file was deleted.

Loading