"use client"; import { Button } from "@heroui/react"; import { Icon } from "@iconify/react"; import React, { useEffect, useState } from "react"; import getGoogleAuthUrl from "../lib/getGoogleAuthUrl"; const OAuthProviders = () => { const [UrlOauth, setUrlOauth] = useState("please wait..."); useEffect(() => { (async () => { try { const res = await getGoogleAuthUrl(); // panggil server function setUrlOauth(JSON.stringify(res)); } catch (err) { console.error(err); } })(); }, []); // set to true if there are other providers coming soon const comingSoonProviders: boolean = true; // Provider for third-party auth const oAuthProviders = [ { name: "Google", icon: "logos:google-icon", }, { name: "Discord", icon: "logos:discord-icon", }, ]; return (