item search

This commit is contained in:
Sirttas
2026-06-13 18:10:26 +02:00
parent cc4d56ae4c
commit dcf50fb8af
3 changed files with 122 additions and 2 deletions
+7 -2
View File
@@ -30,6 +30,11 @@ export const getMarketTypes = async (types: (string | number)[]): Promise<Market
return ids.map(id => cache.get(id)).filter((t): t is MarketType => t !== undefined);
}
export const searchMarketTypes = async (_search: string): Promise<MarketType[]> => {
return []
export const searchMarketTypes = async (search: string): Promise<MarketType[]> => {
if (search.length === 0) {
return [];
}
const types = await marketApi.searchTypes(search).then(r => r.data);
types.forEach(t => cache.set(t.id, t));
return types;
}