Skip to content

Commit

Permalink
Fix svg display in the ramps page (#138)
Browse files Browse the repository at this point in the history
Remove redundant placeholder img
  • Loading branch information
catalinred authored Dec 30, 2024
1 parent ea95e52 commit cf453cf
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 13 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions src/components/ramps/RampFilter.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
.ramp-filter__toggle {
width: 13px;
height: 13px;
background-image: url("./assets/down-arrow.svg");
background-image: url("/src/img/ramps/down-arrow.svg");
background-size: 13px 13px;
background-position: center;
background-repeat: no-repeat;
Expand Down Expand Up @@ -137,7 +137,7 @@
display: inline-block;
width: 15px;
height: 15px;
background-image: url("./assets/check.svg");
background-image: url("/src/img/ramps/check.svg");
background-size: 15px 15px;
background-position: center;
position: absolute;
Expand Down
3 changes: 1 addition & 2 deletions src/components/ramps/Ramps.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { Accordion } from "react-bootstrap";
import CommonMarkdown from "../sharedPageSections/CommonMarkdown";
import ChevronDown from "../../../public/src/img/icons/Angle-down.inline.svg";
import { useTranslation } from "next-i18next";
import RampIconPlaceholder from "./assets/ramp-icon-placeholder.png";

const Ramps = ({
fiatAssets,
Expand Down Expand Up @@ -46,7 +45,7 @@ const Ramps = ({
setGeneralModalData({
title: ramp.title,
websiteUrl: ramp.websiteUrl,
imageUrl: ramp.imageUrl || RampIconPlaceholder.src,
imageUrl: ramp.imageUrl,
});

setModalData([
Expand Down
8 changes: 1 addition & 7 deletions src/components/ramps/RampsCard.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import styles from "./RampsCard.module.scss";
import RampIconPlaceholder from "./assets/ramp-icon-placeholder.png";
import Image from "next/image";
import { useTranslation } from "next-i18next";

Expand All @@ -19,12 +18,7 @@ const RampsCard = ({
onClick={showModalOnClick}
>
<div className={`${styles["ramps-card__icon-container"]}`}>
<Image
src={imageUrl ?? RampIconPlaceholder}
width={61}
height={61}
alt=""
/>
<Image src={imageUrl} width={61} height={61} alt="" />
</div>
<h2 className={`${styles["ramps-card__title"]}`}>{title}</h2>
<p className={`${styles["ramps-card__description"]}`}>{description}</p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ramps/RampsSearch.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
height: 16px;
position: absolute;
right: 10px;
background-image: url("./assets/search-carbon.svg");
background-image: url("/src/img/ramps/search-carbon.svg");
top: 50%;
transform: translateY(-50%);
z-index: 2;
Expand All @@ -68,7 +68,7 @@
height: 40px;
background-color: #9945ff;
border-radius: 100%;
background-image: url("./assets/settings--adjust-carbon.svg");
background-image: url("/src/img/ramps/settings--adjust-carbon.svg");
background-size: 20px 20px;
background-position: center;
background-repeat: no-repeat;
Expand Down
Binary file not shown.

0 comments on commit cf453cf

Please sign in to comment.