Skip to content

Commit

Permalink
Revert "CR: update"
Browse files Browse the repository at this point in the history
This reverts commit 59f50d7.
  • Loading branch information
banklesss committed Apr 2, 2023
1 parent b9f9a79 commit a65df1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Nfts/ImageGallery/ImageGallery.tsx
Expand Up @@ -12,7 +12,7 @@ import {useModeratedNftImage} from '../hooks'

type Props = {
nfts: YoroiNft[]
onSelect: (id: string) => void
onSelect: (index: number) => void
onRefresh: () => void
isRefreshing: boolean
}
Expand All @@ -33,9 +33,9 @@ export const ImageGallery = ({nfts = [], onSelect, onRefresh, isRefreshing}: Pro
refreshing={isRefreshing}
renderItem={(nft) =>
features.moderatingNftsEnabled ? (
<ModeratedImage onPress={() => onSelect(nft.id)} nft={nft} key={nft.id} />
<ModeratedImage onPress={() => onSelect(nfts.indexOf(nft))} nft={nft} key={nft.id} />
) : (
<UnModeratedImage onPress={() => onSelect(nft.id)} nft={nft} key={nft.id} />
<UnModeratedImage onPress={() => onSelect(nfts.indexOf(nft))} nft={nft} key={nft.id} />
)
}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/Nfts/Nfts.tsx
Expand Up @@ -32,7 +32,7 @@ export const Nfts = () => {
const hasEmptySearchResult = nftsSearchTerm.length > 0 && nftsSearchResult.length === 0
const hasNotNfts = nftsSearchTerm.length === 0 && nftsSearchResult.length === 0

const handleNftSelect = (id: string) => navigateTo.nftDetails(id)
const handleNftSelect = (index: number) => navigateTo.nftDetails(nftsSearchResult[index].id)

const onRefresh = React.useCallback(() => {
setIsManualRefreshing(true)
Expand Down

0 comments on commit a65df1a

Please sign in to comment.