"use client"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { createApiClient } from "@app/lib/api"; import LoginForm, { LoginFormIDP } from "@app/components/LoginForm"; import { useEnvContext } from "@app/hooks/useEnvContext"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; import Image from "next/image"; import { cleanRedirect } from "@app/lib/cleanRedirect"; type DashboardLoginFormProps = { redirect?: string; idps?: LoginFormIDP[]; }; export default function DashboardLoginForm({ redirect, idps }: DashboardLoginFormProps) { const router = useRouter(); // const api = createApiClient(useEnvContext()); // // useEffect(() => { // const logout = async () => { // try { // await api.post("/auth/logout"); // console.log("user logged out"); // } catch (e) {} // }; // // logout(); // }); return (
Pangolin Logo

Welcome to Pangolin

Log in to get started

{ if (redirect) { const safe = cleanRedirect(redirect); router.push(safe); } else { router.push("/"); } }} />
); }