Skip to content

Commit

Permalink
fix image rendering by skipping the background in the css and directl…
Browse files Browse the repository at this point in the history
…y using an img tag
  • Loading branch information
rajbos committed Dec 17, 2024
1 parent f817a84 commit f80aa68
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pages/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Index = () => {
const [feedCounts, setFeedCounts] = useState({});
const [totalItemCount, setTotalItemCount] = useState(0);

const REACT_APP_NODE_ENV = "bla";
const REACT_APP_NODE_ENV = "unknown";
const buildNumber = import.meta.env.REACT_APP_BUILDNUMBER || 'unknown';

useEffect(() => {
Expand Down
6 changes: 3 additions & 3 deletions src/pages/Skus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const Skus = () => {
>
<h3>{item.title}</h3>
{!item.videoUrl && <div className="coming-soon-small">Video coming soon</div>}
{item.videoUrl && <div className="play"></div>}
{item.videoUrl && <div className="play"><img src="play-button.png" className="img-play"></img></div>}
</div>
))
}
Expand All @@ -114,7 +114,7 @@ const Skus = () => {
>
<h3>{item.title}</h3>
{!item.videoUrl && <div className="coming-soon-small">Video coming soon</div>}
{item.videoUrl && <div className="play"></div>}
{item.videoUrl && <div className="play"><img src="play-button.png" className="img-play"></img></div>}
</div>
))
}
Expand All @@ -129,7 +129,7 @@ const Skus = () => {
<div key={item.id} className="video-box" onClick={() => handleClick(item.id)}>
<h3>{item.title}</h3>
{!item.videoUrl && <div className="coming-soon-small">Video coming soon</div>}
{item.videoUrl && <div className="play"></div>}
{item.videoUrl && <div className="play"><img src="play-button.png" className="img-play"></img></div>}
</div>
))}
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -445,14 +445,18 @@ h1 {
position: absolute;
bottom: 29px;
left: 36%;
background-image: url(play-button.png);
height: 30px;
width: 30px;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}

.video-box .play .img-play {
height: 100%;
width: 100%;
}

.video-box .coming-soon-small {
position: absolute;
bottom: 30px;
Expand Down

0 comments on commit f80aa68

Please sign in to comment.