Skip to content

Commit

Permalink
refactor(nft): maintain square aspect on nft cards for the image rega…
Browse files Browse the repository at this point in the history
…rdless of grid selection
  • Loading branch information
kespinola committed Apr 14, 2022
1 parent c57760e commit 4f46494
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ SOLANA_ENDPOINT=https://api.devnet.solana.com
NEXT_PUBLIC_SOLANA_ENDPOINT=https://holaplex.rpcpool.com
NEXT_PUBLIC_INDEXER_RPC_URL=https://metaplex-indexer-staging.herokuapp.com
NEXT_PUBLIC_INDEXER_GRAPHQL_URL=https://graph.holaplex.com/v1
NEXT_PUBLIC_ENVIRONMENT=development
-NEXT_PUBLIC_ENVIRONMENT=production
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NEXT_PUBLIC_ARWEAVE_CDN_HOST=/api/arweave/txt
NEXT_PUBLIC_MARKETPLACE_ENABLED=true
FEATURED_STOREFRONTS_URL="https://bafkreigvmqgo5l6zvoc6gscqhrm6a2qboio2jbgpkewv6pwylgbf4v52ai.ipfs.nftstorage.link/"
# NEXT_PUBLIC_INDEXER_GRAPHQL_URL="https://graph-test.holaplex.com/v1"
-NEXT_PUBLIC_ENVIRONMENT=development
13 changes: 8 additions & 5 deletions pages/profiles/[publicKey]/nfts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ export const NFTCard = ({ nft }: { nft: OwnedNFT }) => {
return (
<Link href={`/nfts/${nft.address}`} passHref>
<a className="transform overflow-hidden rounded-lg border-gray-800 shadow-2xl transition duration-[300ms] hover:scale-[1.02]">
<img
src={imgOpt(nft.image, 600)}
alt={nft.name}
className=" aspect-square h-80 w-full object-cover"
/>
<div className="block relative">
<img
src={imgOpt(nft.image, 600)}
alt={nft.name}
className="w-full aspect-square object-cover"

/>
</div>
<div className="h-24 bg-gray-900 py-6 px-4">
<p className="w-max-fit m-0 mb-2 min-h-[28px] truncate text-lg">{nft.name}</p>
{shownCreatorAddress && (
Expand Down

0 comments on commit 4f46494

Please sign in to comment.