swap to ultra-fast APIs on homepage, finish continents

This commit is contained in:
41666 2023-06-09 12:55:24 -04:00
parent 644e25f673
commit 9b439d0a19
14 changed files with 365 additions and 114 deletions

31
app/utils/metagame.ts Normal file
View file

@ -0,0 +1,31 @@
export type MetagameWorld = {
id: number;
zones: {
id: number;
locked: boolean;
alert?: {
id: number;
zone: number;
start_time: string;
end_time: string;
ps2alerts: string;
alert_type: string;
percentages: {
nc: number;
tr: number;
vs: number;
};
};
territory: {
nc: number;
tr: number;
vs: number;
};
}[];
};
export const fetchMetagameWorlds = async (): Promise<MetagameWorld[]> => {
const response = await fetch("https://metagame.ps2.live/all");
const data: MetagameWorld[] = await response.json();
return data;
};