pokeballs.ts 426 Bytes
Newer Older
Michal Čaniga's avatar
Michal Čaniga committed
1
2
import { getDataByIds } from '../utils/dataUtils';

Michal Čaniga's avatar
Michal Čaniga committed
3
export type Pokeballs = {
Michal Čaniga's avatar
Michal Čaniga committed
4
	id: number;
Michal Čaniga's avatar
Michal Čaniga committed
5
6
	name: string;
	price: number;
Michal Čaniga's avatar
Michal Čaniga committed
7
	image?: string;
Michal Čaniga's avatar
Michal Čaniga committed
8
9
};

Michal Čaniga's avatar
Michal Čaniga committed
10
11
12
13
14
15
16
17
export const pokeballs: Pokeballs[] = [
	{ id: 1, name: 'Pokeball 1', price: 12 },
	{ id: 2, name: 'Pokeball 2', price: 48 },
	{ id: 3, name: 'Pokeball 3', price: 19 }
];

export const getUserPokeballs = (pokeballIds: number[]): Pokeballs[] =>
	getDataByIds(pokeballs, pokeballIds);