import axios from "axios";


// YYYY-MM-DD to DD/MM/YYYY
export function formatDate(date: string): string {
    const [year, month, day] = date.split("-");
    return `${day}/${month}/${year}`;
}

export const backend = axios.create({
    baseURL: import.meta.env.VITE_BACKEND_URL,
});

export function wait(ms: number): Promise<void> {
    return new Promise((resolve) => setTimeout(resolve, ms));
}
