item search
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user