Implemented index.ts for PokemonTypes

develop
Jason Zhu 2023-05-07 22:32:06 +10:00
parent 93fe0cb24a
commit 1f0ab75d6e
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import { Tooltip, Zoom } from '@mui/material';
import * as pokeTypeAsset from 'assets/types'; import * as pokeTypeAsset from 'assets/types';
import './PokemonTypes.css'; import './PokemonTypes.css';
function findPokeTypeAsset(pokeType: string) { export const findPokeTypeAsset = (pokeType: string) => {
switch (pokeType) { switch (pokeType) {
case 'normal': case 'normal':
return pokeTypeAsset.pokeType_normal; return pokeTypeAsset.pokeType_normal;
@ -46,7 +46,7 @@ function findPokeTypeAsset(pokeType: string) {
default: default:
return pokeTypeAsset.pokeType_normal; return pokeTypeAsset.pokeType_normal;
} }
} };
export interface PokemonTypesProps { export interface PokemonTypesProps {
types: string[]; types: string[];

View File

@ -0,0 +1,2 @@
export * from './PokemonTypes';
export { default } from './PokemonTypes';