2022-02-17 02:45:18 +00:00
|
|
|
import React, { Component } from 'react';
|
2022-03-27 11:39:33 +00:00
|
|
|
import Flag from 'react-flagkit';
|
2022-02-19 10:45:42 +00:00
|
|
|
import SwapCallsIcon from '@mui/icons-material/SwapCalls';
|
2022-02-17 02:45:18 +00:00
|
|
|
|
2022-01-15 15:12:26 +00:00
|
|
|
export default function getFlags(code){
|
2022-02-19 18:44:02 +00:00
|
|
|
if(code == 'BTC') return <SwapCallsIcon color="primary"/>;
|
2022-03-27 11:39:33 +00:00
|
|
|
if(code == 'XAU') return '🟨';
|
|
|
|
|
|
|
|
if(code == 'AZN') return '🇦🇿'; // code AZ not working
|
|
|
|
if(code == 'XOF') code = 'SN';
|
|
|
|
if(code == 'ANG') code = 'CW';
|
2022-03-27 15:23:00 +00:00
|
|
|
return <div style={{width:24, height: 18}}><Flag country={code.substring(0,2)} size={18}/></div>;
|
2022-03-24 16:27:43 +00:00
|
|
|
};
|