From c4b304b031083b836cf165589af3c109e390e09e Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Wed, 22 Mar 2023 22:16:56 +0700 Subject: [PATCH] fix(#44): add softball --- src/components/SportIcon/SportIcon.tsx | 4 ++++ src/config/sportTypes.tsx | 4 +++- src/features/Icon/index.tsx | 2 +- src/libs/index.ts | 1 + src/libs/objects/Softball.tsx | 20 ++++++++++++++++++++ 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 src/libs/objects/Softball.tsx diff --git a/src/components/SportIcon/SportIcon.tsx b/src/components/SportIcon/SportIcon.tsx index 86bfdb07..45a19e73 100644 --- a/src/components/SportIcon/SportIcon.tsx +++ b/src/components/SportIcon/SportIcon.tsx @@ -77,6 +77,10 @@ const sportIcons = { color: '#ffffff', icon: 'CRICKET', }, + softball: { + color: '#ffffff', + icon: 'Softball', + }, } export const SportIcon = ({ diff --git a/src/config/sportTypes.tsx b/src/config/sportTypes.tsx index b8f642f6..45e5fa0b 100644 --- a/src/config/sportTypes.tsx +++ b/src/config/sportTypes.tsx @@ -13,7 +13,8 @@ export enum SportTypes { FUTSAL = 17, FLOORBALL = 18, CRICKET = 19, - BASEBALL = 20 + BASEBALL = 20, + SOFTBALL = 21 } export const SPORT_NAMES = { @@ -32,4 +33,5 @@ export const SPORT_NAMES = { [SportTypes.FUTSAL]: 'futsal', [SportTypes.FLOORBALL]: 'floorball', [SportTypes.CRICKET]: 'cricket', + [SportTypes.SOFTBALL]: 'softball', } as const diff --git a/src/features/Icon/index.tsx b/src/features/Icon/index.tsx index d6fd2300..38b32bd7 100644 --- a/src/features/Icon/index.tsx +++ b/src/features/Icon/index.tsx @@ -36,7 +36,7 @@ export const Icon: React.FC = ({ > { // @ts-ignore - React.createElement(icons[refIcon], {}) + icons[refIcon] && React.createElement(icons[refIcon], {}) } ) diff --git a/src/libs/index.ts b/src/libs/index.ts index a39144fa..f3795343 100644 --- a/src/libs/index.ts +++ b/src/libs/index.ts @@ -22,3 +22,4 @@ export { PoweredByInsports } from './objects/PoweredByInsports' export { Info } from './objects/Info' export { Streetball } from './objects/Streetball' export { Baseball } from './objects/Baseball' +export { Softball } from './objects/Softball' diff --git a/src/libs/objects/Softball.tsx b/src/libs/objects/Softball.tsx new file mode 100644 index 00000000..6f44de7f --- /dev/null +++ b/src/libs/objects/Softball.tsx @@ -0,0 +1,20 @@ +export const Softball = () => ( + + + + + + + + + + + + +)