Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(components): fix nft image object fit #1049

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bug fixes

- [#1049](https://github.com/alleslabs/celatone-frontend/pull/1049) Change nft image ratio from cover to contain
- [#1044](https://github.com/alleslabs/celatone-frontend/pull/1044) Fix incorrect formatted value in attached funds
- [#1042](https://github.com/alleslabs/celatone-frontend/pull/1042) Fix bugbash for sequencer tier release
- [#1029](https://github.com/alleslabs/celatone-frontend/pull/1029) Fix default wasm permission to permissionless
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/nft/NftCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export const NftCard = ({
left={0}
width="100%"
height="100%"
objectFit="cover"
objectFit="contain"
background="gray.900"
backgroundPosition="center"
borderRadius="8px"
src={metadata?.image}
Expand Down
3 changes: 2 additions & 1 deletion src/lib/pages/nft-collections/components/CollectionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const CollectionCard = ({ collectionInfo }: CollectionCardProps) => {
minW={{ base: 28, md: 40 }}
w={{ base: 28, md: 40 }}
h={{ base: 28, md: 40 }}
objectFit="cover"
objectFit="contain"
background="gray.900"
backgroundPosition="center"
borderRadius="8px"
src={metadata?.image}
Expand Down
10 changes: 8 additions & 2 deletions src/lib/pages/nft-details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ const NftDetailsBody = ({
gap={{ base: 2, md: 8 }}
mt={6}
>
<Flex direction="column" gap={6} maxW={{ md: "360px" }}>
<Flex
direction="column"
gap={6}
minW={{ md: "360px" }}
maxW={{ md: "360px" }}
>
{isMobile && (
<Title
collectionAddress={collectionAddress}
Expand All @@ -132,9 +137,10 @@ const NftDetailsBody = ({
width: "100%",
height: "100%",
borderRadius: "8px",
objectFit: "cover",
objectFit: "contain",
backgroundPosition: "center",
}}
background="gray.900"
borderRadius="8px"
src={metadata?.image}
fallbackSrc={NFT_IMAGE_PLACEHOLDER}
Expand Down
Loading