import { Button } from "@/shared/libs/shadcn/ui/button"; import { DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "@/shared/libs/shadcn/ui/dialog"; import { Input } from "@/shared/libs/shadcn/ui/input"; import { Label } from "@/shared/libs/shadcn/ui/label"; import { Separator } from "@/shared/libs/shadcn/ui/separator"; import { useEffect, useState } from "react"; import { getAllThirdPartyAuth, GetALlThirdPartyAuthCallback, } from "../actions/getAllThirdPartyAuth"; import { Icon } from "@iconify/react"; import { Spinner } from "@/shared/libs/shadcn/ui/spinner"; import { getOauthEndpoint } from "../actions/getOauthEndpoint"; import { useRouter } from "next/navigation"; const SignInCard = () => { const router = useRouter(); const [isLoading, setIsLoading] = useState(false); const [oAuthProviders, setOAuthProviders] = useState(null); useEffect(() => { (async () => { const res = await getAllThirdPartyAuth(); setOAuthProviders(res); })(); }, []); const getOauthEndpointUrl = async (providerReqEndpoint: string) => { const res = await getOauthEndpoint(providerReqEndpoint); router.push(res.data?.endpointUrl || "/"); }; return ( Get Started Sign in to access personalized features and stay updated with the latest content.

or continue with

{oAuthProviders ? (
{oAuthProviders.data?.map((provider, index) => ( ))}
) : ( )}
); }; export default SignInCard;