forked from Qortal/q-support
		
	Bounties can be added to an Issue. They can be either a direct payment from the publisher in ANY supported coin, or they can be a link to a Q-Fund. Q-Funds that are still in progress have a donate button so users can support it without having to leave Q-Support and open the Q-Fund. Any category can be searched for individually using the "Single Category" Combobox. user can add source code to their Issue, so it is easier to see. IssueIcons have a tooltip that displays the name of its category. If the category is Q-Apps/Websites, then the icon of its owner will also be displayed.
		
			
				
	
	
		
			53 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import React, { CSSProperties } from "react";
 | 
						|
import ARRRicon from "../../../src/assets/icons/CoinIcons/arrr.png";
 | 
						|
import BTCicon from "../../../src/assets/icons/CoinIcons/btc.png";
 | 
						|
import DGBicon from "../../../src/assets/icons/CoinIcons/dgb.png";
 | 
						|
import DOGEicon from "../../../src/assets/icons/CoinIcons/doge.png";
 | 
						|
import LTCicon from "../../../src/assets/icons/CoinIcons/ltc.png";
 | 
						|
import QfundIcon from "../../../src/assets/icons/CoinIcons/Q-FundIcon.png";
 | 
						|
import QORTicon from "../../../src/assets/icons/CoinIcons/qort.png";
 | 
						|
import RVNicon from "../../../src/assets/icons/CoinIcons/rvn.png";
 | 
						|
import { CoinType } from "../../constants/PublishFees/FeePricePublish/FeePricePublish.ts";
 | 
						|
import { IssueIcon } from "./IssueIcon.tsx";
 | 
						|
 | 
						|
interface CoinIconProps {
 | 
						|
  coinType: CoinType;
 | 
						|
  showBackupIcon?: boolean;
 | 
						|
  style?: CSSProperties;
 | 
						|
  isQfund: boolean;
 | 
						|
}
 | 
						|
 | 
						|
export const CoinIcon = ({
 | 
						|
  coinType = "QORT",
 | 
						|
  showBackupIcon,
 | 
						|
  style,
 | 
						|
  isQfund,
 | 
						|
}: CoinIconProps) => {
 | 
						|
  const getIcon = () => {
 | 
						|
    if (isQfund) return QfundIcon;
 | 
						|
    switch (coinType) {
 | 
						|
      case "QORT":
 | 
						|
        return QORTicon;
 | 
						|
      case "LTC":
 | 
						|
        return LTCicon;
 | 
						|
      case "BTC":
 | 
						|
        return BTCicon;
 | 
						|
      case "DOGE":
 | 
						|
        return DOGEicon;
 | 
						|
      case "DGB":
 | 
						|
        return DGBicon;
 | 
						|
      case "RVN":
 | 
						|
        return RVNicon;
 | 
						|
      case "ARRR":
 | 
						|
        return ARRRicon;
 | 
						|
    }
 | 
						|
  };
 | 
						|
  return (
 | 
						|
    <IssueIcon
 | 
						|
      iconSrc={getIcon()}
 | 
						|
      style={style}
 | 
						|
      showBackupIcon={showBackupIcon}
 | 
						|
    />
 | 
						|
  );
 | 
						|
};
 |