From 58bb9748e2347a290bbbefc47a164cd307039ddb Mon Sep 17 00:00:00 2001 From: Bartlomiej Tarczynski Date: Thu, 18 Apr 2024 15:07:31 +0200 Subject: [PATCH] Reorder files --- packages/frontend/src/components/auction/Auction.tsx | 4 ++-- .../src/components/{common => bids}/BidsColumns.tsx | 0 .../BidsListContainer.tsx} | 2 +- .../BidListEntry.tsx => bids/BidsListEntry.tsx} | 4 ++-- .../{bidsList => bids}/BidsListHeaders.tsx | 2 +- .../src/components/{ => bids}/allBids/AllBids.tsx | 6 +++--- .../components/{ => bids}/allBids/AllBidsList.tsx | 8 ++++---- .../components/{ => bids}/allBids/BidsSubList.tsx | 10 +++++----- .../src/components/{ => bids}/allBids/Header.tsx | 0 .../components/{ => bids}/allBids/LoadingBids.tsx | 0 .../components/{ => bids}/allBids/NothingFound.tsx | 0 .../src/components/{ => bids}/allBids/useMatchBid.ts | 0 .../bidsShortList}/BidsShortList.tsx | 12 ++++++------ .../bidsShortList/BidsShortListSection.tsx} | 6 +++--- packages/frontend/src/pages/bids.tsx | 4 ++-- 15 files changed, 29 insertions(+), 29 deletions(-) rename packages/frontend/src/components/{common => bids}/BidsColumns.tsx (100%) rename packages/frontend/src/components/{common/BidListContainer.tsx => bids/BidsListContainer.tsx} (76%) rename packages/frontend/src/components/{common/BidListEntry.tsx => bids/BidsListEntry.tsx} (95%) rename packages/frontend/src/components/{bidsList => bids}/BidsListHeaders.tsx (88%) rename packages/frontend/src/components/{ => bids}/allBids/AllBids.tsx (85%) rename packages/frontend/src/components/{ => bids}/allBids/AllBidsList.tsx (83%) rename packages/frontend/src/components/{ => bids}/allBids/BidsSubList.tsx (82%) rename packages/frontend/src/components/{ => bids}/allBids/Header.tsx (100%) rename packages/frontend/src/components/{ => bids}/allBids/LoadingBids.tsx (100%) rename packages/frontend/src/components/{ => bids}/allBids/NothingFound.tsx (100%) rename packages/frontend/src/components/{ => bids}/allBids/useMatchBid.ts (100%) rename packages/frontend/src/components/{bidsList => bids/bidsShortList}/BidsShortList.tsx (90%) rename packages/frontend/src/components/{bidsList/BidsListSection.tsx => bids/bidsShortList/BidsShortListSection.tsx} (90%) diff --git a/packages/frontend/src/components/auction/Auction.tsx b/packages/frontend/src/components/auction/Auction.tsx index e1799d35..cf8e7228 100644 --- a/packages/frontend/src/components/auction/Auction.tsx +++ b/packages/frontend/src/components/auction/Auction.tsx @@ -1,11 +1,11 @@ import styled from 'styled-components' import { Colors } from '@/styles/colors' -import { BidsListSection } from '@/components/bidsList/BidsListSection' +import { BidsShortListSection } from '@/components/bids/bidsShortList/BidsShortListSection' export const Auction = () => { return ( - + ) } diff --git a/packages/frontend/src/components/common/BidsColumns.tsx b/packages/frontend/src/components/bids/BidsColumns.tsx similarity index 100% rename from packages/frontend/src/components/common/BidsColumns.tsx rename to packages/frontend/src/components/bids/BidsColumns.tsx diff --git a/packages/frontend/src/components/common/BidListContainer.tsx b/packages/frontend/src/components/bids/BidsListContainer.tsx similarity index 76% rename from packages/frontend/src/components/common/BidListContainer.tsx rename to packages/frontend/src/components/bids/BidsListContainer.tsx index 1ea35d82..87f2716b 100644 --- a/packages/frontend/src/components/common/BidListContainer.tsx +++ b/packages/frontend/src/components/bids/BidsListContainer.tsx @@ -1,6 +1,6 @@ import styled from 'styled-components' -export const BidListContainer = styled.div` +export const BidsListContainer = styled.div` display: flex; flex-direction: column; row-gap: 32px; diff --git a/packages/frontend/src/components/common/BidListEntry.tsx b/packages/frontend/src/components/bids/BidsListEntry.tsx similarity index 95% rename from packages/frontend/src/components/common/BidListEntry.tsx rename to packages/frontend/src/components/bids/BidsListEntry.tsx index b666caf0..5f65c4fc 100644 --- a/packages/frontend/src/components/common/BidListEntry.tsx +++ b/packages/frontend/src/components/bids/BidsListEntry.tsx @@ -1,4 +1,4 @@ -import { AddressColumn, BidColumn, PlaceColumn } from '@/components/common/BidsColumns' +import { AddressColumn, BidColumn, PlaceColumn } from '@/components/bids/BidsColumns' import styled, { css } from 'styled-components' import { useChainId, useChains } from 'wagmi' import { BidWithPlace } from '@/types/bid' @@ -11,7 +11,7 @@ interface Props { view?: 'short' | 'full' } -export const BidListEntry = ({ bid, isUser, view = 'full' }: Props) => { +export const BidsListEntry = ({ bid, isUser, view = 'full' }: Props) => { const explorerAddressLink = useExplorerAddressLink(bid.address) return ( diff --git a/packages/frontend/src/components/bidsList/BidsListHeaders.tsx b/packages/frontend/src/components/bids/BidsListHeaders.tsx similarity index 88% rename from packages/frontend/src/components/bidsList/BidsListHeaders.tsx rename to packages/frontend/src/components/bids/BidsListHeaders.tsx index 57445ad9..ac024b24 100644 --- a/packages/frontend/src/components/bidsList/BidsListHeaders.tsx +++ b/packages/frontend/src/components/bids/BidsListHeaders.tsx @@ -1,4 +1,4 @@ -import { AddressColumn, BidColumn, BidsColumns, PlaceColumn } from '@/components/common/BidsColumns' +import { AddressColumn, BidColumn, BidsColumns, PlaceColumn } from '@/components/bids/BidsColumns' export const BidsListHeaders = () => { return ( diff --git a/packages/frontend/src/components/allBids/AllBids.tsx b/packages/frontend/src/components/bids/allBids/AllBids.tsx similarity index 85% rename from packages/frontend/src/components/allBids/AllBids.tsx rename to packages/frontend/src/components/bids/allBids/AllBids.tsx index 60ddfb84..1ce038ee 100644 --- a/packages/frontend/src/components/allBids/AllBids.tsx +++ b/packages/frontend/src/components/bids/allBids/AllBids.tsx @@ -2,9 +2,9 @@ import { useState } from 'react' import styled from 'styled-components' import { useReadAuctionParams } from '@/blockchain/hooks/useReadAuctionParams' import { useBids } from '@/providers/BidsProvider' -import { NothingFound } from '@/components/allBids/NothingFound' -import { LoadingBids } from '@/components/allBids/LoadingBids' -import { AllBidsList } from '@/components/allBids/AllBidsList' +import { NothingFound } from '@/components/bids/allBids/NothingFound' +import { LoadingBids } from '@/components/bids/allBids/LoadingBids' +import { AllBidsList } from '@/components/bids/allBids/AllBidsList' import { SearchInput } from '@/components/form/SearchInput' export const AllBids = () => { diff --git a/packages/frontend/src/components/allBids/AllBidsList.tsx b/packages/frontend/src/components/bids/allBids/AllBidsList.tsx similarity index 83% rename from packages/frontend/src/components/allBids/AllBidsList.tsx rename to packages/frontend/src/components/bids/allBids/AllBidsList.tsx index 1b8aad2d..07bb2731 100644 --- a/packages/frontend/src/components/allBids/AllBidsList.tsx +++ b/packages/frontend/src/components/bids/allBids/AllBidsList.tsx @@ -1,10 +1,10 @@ import { useMemo } from 'react' import { getFirstRaffleBidIndex } from '@/utils/getFirstRaffleBidIndex' import { useBids } from '@/providers/BidsProvider' -import { NothingFound } from '@/components/allBids/NothingFound' -import { BidsListHeaders } from '@/components/bidsList/BidsListHeaders' -import { useMatchBid } from '@/components/allBids/useMatchBid' -import { BidsSubList } from '@/components/allBids/BidsSubList' +import { NothingFound } from '@/components/bids/allBids/NothingFound' +import { BidsListHeaders } from '@/components/bids/BidsListHeaders' +import { useMatchBid } from '@/components/bids/allBids/useMatchBid' +import { BidsSubList } from '@/components/bids/allBids/BidsSubList' interface AllBidsListProps { search: string diff --git a/packages/frontend/src/components/allBids/BidsSubList.tsx b/packages/frontend/src/components/bids/allBids/BidsSubList.tsx similarity index 82% rename from packages/frontend/src/components/allBids/BidsSubList.tsx rename to packages/frontend/src/components/bids/allBids/BidsSubList.tsx index b2f472d9..6c870a74 100644 --- a/packages/frontend/src/components/allBids/BidsSubList.tsx +++ b/packages/frontend/src/components/bids/allBids/BidsSubList.tsx @@ -1,8 +1,8 @@ import styled from 'styled-components' import { Bid, bidToBidWithPlace } from '@/types/bid' import { Colors } from '@/styles/colors' -import { BidListContainer } from '@/components/common/BidListContainer' -import { BidListEntry } from '@/components/common/BidListEntry' +import { BidsListContainer } from '@/components/bids/BidsListContainer' +import { BidsListEntry } from '@/components/bids/BidsListEntry' import { useAccount } from 'wagmi' interface Props { @@ -19,16 +19,16 @@ export const BidsSubList = ({ bids, placeOffset, title }: Props) => { {title} - + {bids.map((bid, index) => ( - ))} - + ) } diff --git a/packages/frontend/src/components/allBids/Header.tsx b/packages/frontend/src/components/bids/allBids/Header.tsx similarity index 100% rename from packages/frontend/src/components/allBids/Header.tsx rename to packages/frontend/src/components/bids/allBids/Header.tsx diff --git a/packages/frontend/src/components/allBids/LoadingBids.tsx b/packages/frontend/src/components/bids/allBids/LoadingBids.tsx similarity index 100% rename from packages/frontend/src/components/allBids/LoadingBids.tsx rename to packages/frontend/src/components/bids/allBids/LoadingBids.tsx diff --git a/packages/frontend/src/components/allBids/NothingFound.tsx b/packages/frontend/src/components/bids/allBids/NothingFound.tsx similarity index 100% rename from packages/frontend/src/components/allBids/NothingFound.tsx rename to packages/frontend/src/components/bids/allBids/NothingFound.tsx diff --git a/packages/frontend/src/components/allBids/useMatchBid.ts b/packages/frontend/src/components/bids/allBids/useMatchBid.ts similarity index 100% rename from packages/frontend/src/components/allBids/useMatchBid.ts rename to packages/frontend/src/components/bids/allBids/useMatchBid.ts diff --git a/packages/frontend/src/components/bidsList/BidsShortList.tsx b/packages/frontend/src/components/bids/bidsShortList/BidsShortList.tsx similarity index 90% rename from packages/frontend/src/components/bidsList/BidsShortList.tsx rename to packages/frontend/src/components/bids/bidsShortList/BidsShortList.tsx index d34c382b..b8663648 100644 --- a/packages/frontend/src/components/bidsList/BidsShortList.tsx +++ b/packages/frontend/src/components/bids/bidsShortList/BidsShortList.tsx @@ -7,10 +7,10 @@ import { useReadAuctionParams } from '@/blockchain/hooks/useReadAuctionParams' import { useBids } from '@/providers/BidsProvider' import { useContractState } from '@/blockchain/hooks/useAuctionState' import { Separator } from '@/components/common/Separator' -import { BidListEntry } from '@/components/common/BidListEntry' +import { BidsListEntry } from '@/components/bids/BidsListEntry' import { isAuctionSettled } from '@/utils/isAuctionSettled' import { getFirstRaffleBidIndex } from '@/utils/getFirstRaffleBidIndex' -import { BidListContainer } from '@/components/common/BidListContainer' +import { BidsListContainer } from '@/components/bids/BidsListContainer' const topAuctionBidsCount = 3 const bidsMaxCount = topAuctionBidsCount + 1 @@ -32,17 +32,17 @@ export const BidsShortList = () => { return ( <> - + {bidsShortList.map((bid) => ( - + ))} {!participatesInAuction && userBid && ( <> - + )} - + {userBid && !isAuctionSettled(state) && ( You’re taking part in the {participatesInAuction ? 'auction' : 'raffle'}! )} diff --git a/packages/frontend/src/components/bidsList/BidsListSection.tsx b/packages/frontend/src/components/bids/bidsShortList/BidsShortListSection.tsx similarity index 90% rename from packages/frontend/src/components/bidsList/BidsListSection.tsx rename to packages/frontend/src/components/bids/bidsShortList/BidsShortListSection.tsx index 5e1194ff..cc7825ab 100644 --- a/packages/frontend/src/components/bidsList/BidsListSection.tsx +++ b/packages/frontend/src/components/bids/bidsShortList/BidsShortListSection.tsx @@ -5,10 +5,10 @@ import { useBids } from '@/providers/BidsProvider' import { Button } from '@/components/buttons/Button' import { useRouter } from 'next/navigation' import { Colors } from '@/styles/colors' -import { BidsShortList } from '@/components/bidsList/BidsShortList' -import { BidsListHeaders } from '@/components/bidsList/BidsListHeaders' +import { BidsShortList } from '@/components/bids/bidsShortList/BidsShortList' +import { BidsListHeaders } from '@/components/bids/BidsListHeaders' -export const BidsListSection = () => { +export const BidsShortListSection = () => { const state = useAuctionState() const { bidList, isLoading: areBidsLoading } = useBids() const router = useRouter() diff --git a/packages/frontend/src/pages/bids.tsx b/packages/frontend/src/pages/bids.tsx index ed48715f..51c4c8ba 100644 --- a/packages/frontend/src/pages/bids.tsx +++ b/packages/frontend/src/pages/bids.tsx @@ -1,7 +1,7 @@ import styled from 'styled-components' import { Colors } from '@/styles/colors' -import { Header } from '@/components/allBids/Header' -import { AllBids } from '@/components/allBids/AllBids' +import { Header } from '@/components/bids/allBids/Header' +import { AllBids } from '@/components/bids/allBids/AllBids' export default function Bids() { return (