export const getUsers = async (id?: string) => { try { const data = await fetch(`/api/users${id ? `?id=${id}` : ""}`) .then((result) => result.json()) return data } catch (error: any) { return error.response.data } }