Skip to content

Commit

Permalink
Reorder files
Browse files Browse the repository at this point in the history
  • Loading branch information
b-tarczynski committed Apr 18, 2024
1 parent 2414d08 commit 58bb974
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/components/auction/Auction.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<Wrapper>
<BidsListSection />
<BidsShortListSection />
</Wrapper>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -19,16 +19,16 @@ export const BidsSubList = ({ bids, placeOffset, title }: Props) => {
<TitleBanner>
<SubListHeader>{title}</SubListHeader>
</TitleBanner>
<BidListContainer>
<BidsListContainer>
{bids.map((bid, index) => (
<BidListEntry
<BidsListEntry
key={bid.bidderId}
bid={bidToBidWithPlace(bid, placeOffset + index)}
isUser={address === bid.address}
view="full"
/>
))}
</BidListContainer>
</BidsListContainer>
</>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,17 +32,17 @@ export const BidsShortList = () => {

return (
<>
<BidListContainer>
<BidsListContainer>
{bidsShortList.map((bid) => (
<BidListEntry key={bid.address} bid={bid} isUser={userBid && userBid.address === bid.address} view="short" />
<BidsListEntry key={bid.address} bid={bid} isUser={userBid && userBid.address === bid.address} view="short" />
))}
{!participatesInAuction && userBid && (
<>
<Separator color={Colors.Grey} />
<BidListEntry bid={userBid} isUser view="short" />
<BidsListEntry bid={userBid} isUser view="short" />
</>
)}
</BidListContainer>
</BidsListContainer>
{userBid && !isAuctionSettled(state) && (
<BidListText>You’re taking part in the {participatesInAuction ? 'auction' : 'raffle'}!</BidListText>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/pages/bids.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down

0 comments on commit 58bb974

Please sign in to comment.