Spaces:
Runtime error
Runtime error
File size: 285 Bytes
31f62e8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
export const useUser = () => {
const openWindowLogin = async () => {
const response = await fetch(`/api/login`);
const { ok, redirect } = await response.json();
if (ok && redirect) {
window.open(redirect, "_blank");
}
};
return {
openWindowLogin,
}
} |