interface ReqApiData { baseApiUrl: string url: string } export const useApiData = async (req: ReqApiData): Promise => { const dataUrl = `${req.baseApiUrl}/${req.url}` // 정상 URL 경로 try { const fetch = await $fetch(dataUrl, { method: 'GET', headers: { 'Content-Type': 'application/json;charset=UTF-8' } }) return fetch } catch (error) { console.log('error', error) return [] } }