fix Navbar and Sidebar
This commit is contained in:
11
app/javascript/src/utils/getCurrencyLogo.ts
Normal file
11
app/javascript/src/utils/getCurrencyLogo.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { tokens } from "../constants/pancake/Tokens";
|
||||
|
||||
const tokensList = Object.values(tokens);
|
||||
|
||||
export const getCurrencyLogo = (symbol?: string) => {
|
||||
const token = tokensList.find((item) => item.symbol === symbol);
|
||||
|
||||
if (token) {
|
||||
return `https://pancakeswap.finance/images/tokens/${token.address["56"]}.svg`;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user