Skip to content

Commit

Permalink
fix minor issues(change json, add bidby url link)
Browse files Browse the repository at this point in the history
  • Loading branch information
luisDev committed Apr 12, 2022
1 parent f6b5f58 commit aac0e7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/BidHistoryModal/landHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const TableItem = styled.div`

export const LandBidHistoryModal = (props: any) => {
const rows = props.allPlacedBids.map((item: any) => ({
bidBy: `${ shortenAddress(item.bidBy, 7) }`,
bidBy: `${ item.bidBy }`,
bidAmount: `${item.bidPrice} ETH`,
dateOfBid: `${ item.createdAt ? item.createdAt : '' }`
}))
Expand Down Expand Up @@ -130,7 +130,7 @@ export const LandBidHistoryModal = (props: any) => {
key: 'bidBy',
numeric: false,
render: (row: any, index: any) => (
<TableItem key={'bidBy' + index}>{row.bidBy} </TableItem>
<TableItem key={'bidBy' + index}><a target={'_blank'} rel="noreferrer" href={`https://etherscan.io/address/${row.bidBy}`}>{shortenAddress(row.bidBy, 7)}</a> </TableItem>
),
label: 'Bid By'
}, {
Expand Down
2 changes: 1 addition & 1 deletion src/constants/map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const DarkRoadColors = {
'FUD AVENUE': 0x262626,
}

export const mapLandDataUrl = 'https://shiboshis.mypinata.cloud/ipfs/QmZBj8nZBCGGZx2d87EoboFW1YH1oSHWHMFGzoxUHbnMRD'
export const mapLandDataUrl = 'https://shiboshis.mypinata.cloud/ipfs/QmZ1U5PV21F3VzTw7791epzVmQ3RpeFbVhMQyZrZhDatVw'
//'https://shiboshis.mypinata.cloud/ipfs/QmYXckMd93DPq6XPaC1iisUs1t2jReE8mdaTuQYpmmLbgP'

export const apiServer = 'https://blabla-dev.herokuapp.com'
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/useLandMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const useLandMap = () => {
const setSearchOptions = (newOptions: any): any => dispatch( updateSearchOptions( { newOptions } ) )

const fetchInfo = useCallback(async () => {
if( !landData.length ) {
if( !landData.length ) { // only load at first time
const result = await fetch(mapLandDataUrl)
const json_data = await result.json()

Expand Down Expand Up @@ -70,8 +70,8 @@ const useLandMap = () => {

const fetchAccountBidsInfo = useCallback(async () => {
if( account ) {
const response = await axios.get(`${apiServer}/bids?user=${account?.toLowerCase()}`)
const arrayData = response.data.data.length > 0 ? response.data.data : []
const response = await axios.get(`${apiServer}/users/${account?.toLowerCase()}?$select[]=bids`)
const arrayData = response.data.bids.length > 0 ? response.data.bids : []
setAccountBidsInfo(arrayData)
}
}, [account])
Expand Down

0 comments on commit aac0e7e

Please sign in to comment.