Open History to see the last commit
1const baseUrl = import.meta.env.SSR
2 ? `http://localhost:${process.env.PORT || 5173}`
3 : ''
4β
5export const waitAPI = {
6 getWait: async (wait: number): Promise<string> => {
7 const response = await fetch(`${baseUrl}/api/wait?wait=${wait}`)
8 if (!response.ok) throw new Error('Failed to fetch data')
9 return await response.json()
10 },
11}