import axios from "./instance"; import { MAP_TILE_LIST } from "./constant"; type ServiceMapTile = { id: number; name: string, mapUrl: string; coord: string; }; export type MapTile = { id: number; name: string, mapUrls: {tempUrl: string, maximumLevel: number}[]; coord: string; }; export const fetchMapTiles = async () => { const items = await axios.get(MAP_TILE_LIST); return items.map((item) => ({ ...item, mapUrls: JSON.parse(item.mapUrl), })); };