cleanup
This commit is contained in:
@@ -18,4 +18,10 @@ const timeFormat = new Intl.NumberFormat("en-US", {
|
||||
minimumIntegerDigits: 2
|
||||
});
|
||||
|
||||
export const formatEveDate = (date?: Date | null) => !date ? '' : `${date.getUTCFullYear()}.${timeFormat.format(date.getUTCMonth() + 1)}.${timeFormat.format(date.getUTCDate())} ${timeFormat.format(date.getUTCHours())}:${timeFormat.format(date.getUTCMinutes())}`;
|
||||
export const formatEveDate = (date?: Date | null) => {
|
||||
try {
|
||||
return !date ? '' : `${date.getUTCFullYear()}.${timeFormat.format(date.getUTCMonth() + 1)}.${timeFormat.format(date.getUTCDate())} ${timeFormat.format(date.getUTCHours())}:${timeFormat.format(date.getUTCMinutes())}`;
|
||||
} catch (e) {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
@@ -11,7 +11,7 @@ export type EsiMarketOrderHistory = {
|
||||
}
|
||||
|
||||
// TODO use pinia store
|
||||
const historyCache: { [key: number]: { [key: number]: EsiMarketOrderHistory[] } } = {};
|
||||
const historyCache: Record<number, Record<number, EsiMarketOrderHistory[]>> = {};
|
||||
|
||||
export const getHistory = async (regionId: number, tyeId: number): Promise<EsiMarketOrderHistory[]> => {
|
||||
if (historyCache[regionId]?.[tyeId]) {
|
||||
|
||||
Reference in New Issue
Block a user