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 SVG display in the ramps page #138

Merged
merged 1 commit into from
Dec 30, 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
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.
Loading