feat(#17): Add an appraisal compare-by-location page
This commit is contained in:
1 parent
c4803ef650
commit
81250953eb
17 files changed
+361
-21
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import {universeApi} from '@/mammon/mammonService';
|
||||
import type {MarketLocationResponse} from '@/generated/mammon';
|
||||
|
||||
export type MarketLocation = MarketLocationResponse;
|
||||
|
||||
const cache = new Map<number, MarketLocation>();
|
||||
|
||||
export const searchMarketLocations = async (search: string): Promise<MarketLocation[]> => {
|
||||
if (search.length === 0) {
|
||||
return [];
|
||||
}
|
||||
const locations = await universeApi.searchLocations(search).then(r => r.data);
|
||||
locations.forEach(l => cache.set(l.id, l));
|
||||
return locations;
|
||||
};
|
||||
Reference in new issue
Block a user