import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useNavigate } from "react-router-dom";
import { useUser } from "./UserProvider";
import { useEffect } from "react";
import { Spinner } from "@/components/ui/spinner";
const SignOut = () => {
    const { signout } = useUser();
    const navigate = useNavigate();
    signout();
    useEffect(() => {
        navigate("/");
    }, []);
    return (_jsx("div", { className: "flex flex-grow flex-col justify-center", children: _jsx("div", { className: "flex justify-center text-lg font-semibold", children: _jsxs("div", { className: "flex flex-col gap-5", children: [_jsx("div", { children: "Already Signed In. Redirecting...." }), _jsx(Spinner, {})] }) }) }));
};
export default SignOut;
