Skip to content

Commit

Permalink
[Dashboard] Fix styling for no-image NFT (#4181)
Browse files Browse the repository at this point in the history
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the styling of the `NFTMedia` component by adding explicit `width` and `height` properties.

### Detailed summary
- Added inline styles for `width` and `height` based on `props`
- Updated `className` to include `border-border` class

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
  • Loading branch information
kien-ngo committed Aug 19, 2024
1 parent bd46699 commit 15899ea
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/dashboard/src/tw-components/nft-media.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ export const NFTMediaWithEmptyState: React.FC<{
if (!(props.metadata.image || props.metadata.animation_url)) {
return (
<div
style={{
width: props.width,
height: props.height,
}}
className={cn(
"overflow-hidden rounded-xl object-contain flex-shrink-0 border grid place-items-center",
props.width && `w-[${props.width}]`,
props.height && `h-[${props.height}]`,
"overflow-hidden rounded-xl object-contain flex-shrink-0 border border-border grid place-items-center",
props.className,
)}
>
Expand Down

0 comments on commit 15899ea

Please sign in to comment.