From 1f0ab75d6e91eaa0dd3f6344fb58051ca0c087db Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Sun, 7 May 2023 22:32:06 +1000 Subject: [PATCH] Implemented index.ts for PokemonTypes --- src/components/PokemonTypes/PokemonTypes.tsx | 4 ++-- src/components/PokemonTypes/index.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 src/components/PokemonTypes/index.ts diff --git a/src/components/PokemonTypes/PokemonTypes.tsx b/src/components/PokemonTypes/PokemonTypes.tsx index c575974..2fa537c 100644 --- a/src/components/PokemonTypes/PokemonTypes.tsx +++ b/src/components/PokemonTypes/PokemonTypes.tsx @@ -5,7 +5,7 @@ import { Tooltip, Zoom } from '@mui/material'; import * as pokeTypeAsset from 'assets/types'; import './PokemonTypes.css'; -function findPokeTypeAsset(pokeType: string) { +export const findPokeTypeAsset = (pokeType: string) => { switch (pokeType) { case 'normal': return pokeTypeAsset.pokeType_normal; @@ -46,7 +46,7 @@ function findPokeTypeAsset(pokeType: string) { default: return pokeTypeAsset.pokeType_normal; } -} +}; export interface PokemonTypesProps { types: string[]; diff --git a/src/components/PokemonTypes/index.ts b/src/components/PokemonTypes/index.ts new file mode 100644 index 0000000..8d71773 --- /dev/null +++ b/src/components/PokemonTypes/index.ts @@ -0,0 +1,2 @@ +export * from './PokemonTypes'; +export { default } from './PokemonTypes';