From 0cc73e56941fa8e058abe3e3121b9e7171bd0f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio=20=7C=20stacio=2Eeth?= Date: Wed, 18 May 2022 23:42:43 -0300 Subject: [PATCH] fix: update icons url (#114) --- client/src/components/CoinSelector.tsx | 5 +---- client/src/components/CoinsListDialog.tsx | 5 +---- client/src/hooks/useAssets.ts | 5 ++++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/client/src/components/CoinSelector.tsx b/client/src/components/CoinSelector.tsx index a3522cd1..10583735 100644 --- a/client/src/components/CoinSelector.tsx +++ b/client/src/components/CoinSelector.tsx @@ -2,14 +2,11 @@ import { useState, useEffect } from "react"; import { FiChevronDown } from "react-icons/fi"; import CoinsMetadata from "src/lib/CoinsMetadata"; import { Coin } from "src/types"; -import urlJoin from "url-join"; import { Button } from "./Button"; import { CoinsListDialog } from "./CoinsListDialog"; import { Dialog, useDialogProps } from "./Dialog"; -const { PUBLIC_URL } = process.env; - const style = { currencySelector: `flex1`, }; @@ -49,7 +46,7 @@ export function CoinSelector({ {selected && selected.img && ( {selected.name} {coin.name} => { @@ -13,7 +16,7 @@ const mergeCoinsWithMetadata = (coins: CoinQuantity[] = []): Array => { // Another options could be querying from the contract // https://github.com/FuelLabs/swayswap-demo/issues/33 name: coinMetadata?.name || '404', - img: coinMetadata?.img || '/icons/other.svg', + img: urljoin(PUBLIC_URL, coinMetadata?.img || '/icons/other.svg'), assetId: coin.assetId, amount: toBigInt(coin.amount || 0), };