From ac27533ca27878dd8253f2d48b599efdbe5f5a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Santana=20Gon=C3=A7alves?= Date: Mon, 22 Jul 2024 13:18:49 -0300 Subject: [PATCH] move hooks to shared folder (#72) * move hooks to shared folder * Moved defaultNFT.ts --------- Co-authored-by: Francis Rodriguez --- src/app/communities/CommunityItem.tsx | 5 ++--- src/pages/communities/nft/[address].tsx | 8 ++++---- .../communities/nft/images => shared}/defaultNFT.ts | 0 .../communities/nft => shared}/hooks/useCidsAvailable.ts | 0 src/{pages/communities/nft => shared}/hooks/useMintNFT.ts | 0 .../communities/nft => shared}/hooks/useNFTImage.ts | 0 6 files changed, 6 insertions(+), 7 deletions(-) rename src/{pages/communities/nft/images => shared}/defaultNFT.ts (100%) rename src/{pages/communities/nft => shared}/hooks/useCidsAvailable.ts (100%) rename src/{pages/communities/nft => shared}/hooks/useMintNFT.ts (100%) rename src/{pages/communities/nft => shared}/hooks/useNFTImage.ts (100%) diff --git a/src/app/communities/CommunityItem.tsx b/src/app/communities/CommunityItem.tsx index 17e19803..a8b4be26 100644 --- a/src/app/communities/CommunityItem.tsx +++ b/src/app/communities/CommunityItem.tsx @@ -1,8 +1,7 @@ -import Image from 'next/image' -import { firstNft } from '@/app/communities/communityUtils' +import { Button } from '@/components/Button' import { Paragraph, Span } from '@/components/Typography' +import Image from 'next/image' import { BsArrowUpRight } from 'react-icons/bs' -import { Button } from '@/components/Button' import { VscChevronUp } from 'react-icons/vsc' interface CommunityItemProps { diff --git a/src/pages/communities/nft/[address].tsx b/src/pages/communities/nft/[address].tsx index 682bab57..2397d701 100644 --- a/src/pages/communities/nft/[address].tsx +++ b/src/pages/communities/nft/[address].tsx @@ -11,10 +11,10 @@ import { BsTwitterX } from 'react-icons/bs' import { FaDiscord, FaLink } from 'react-icons/fa' import { Address } from 'viem' import { useAccount } from 'wagmi' -import { useCidsAvailable } from './hooks/useCidsAvailable' -import { useMintNFT } from './hooks/useMintNFT' -import { useNFTImage } from './hooks/useNFTImage' -import { DEFAULT_NFT_BASE64 } from './images/defaultNFT' +import { useCidsAvailable } from '@/shared/hooks/useCidsAvailable' +import { useMintNFT } from '@/shared/hooks/useMintNFT' +import { useNFTImage } from '@/shared/hooks/useNFTImage' +import { DEFAULT_NFT_BASE64 } from '@/shared/defaultNFT' export default function Page() { const { diff --git a/src/pages/communities/nft/images/defaultNFT.ts b/src/shared/defaultNFT.ts similarity index 100% rename from src/pages/communities/nft/images/defaultNFT.ts rename to src/shared/defaultNFT.ts diff --git a/src/pages/communities/nft/hooks/useCidsAvailable.ts b/src/shared/hooks/useCidsAvailable.ts similarity index 100% rename from src/pages/communities/nft/hooks/useCidsAvailable.ts rename to src/shared/hooks/useCidsAvailable.ts diff --git a/src/pages/communities/nft/hooks/useMintNFT.ts b/src/shared/hooks/useMintNFT.ts similarity index 100% rename from src/pages/communities/nft/hooks/useMintNFT.ts rename to src/shared/hooks/useMintNFT.ts diff --git a/src/pages/communities/nft/hooks/useNFTImage.ts b/src/shared/hooks/useNFTImage.ts similarity index 100% rename from src/pages/communities/nft/hooks/useNFTImage.ts rename to src/shared/hooks/useNFTImage.ts