import { useEffect, useState } from "react"; import { Helmet } from "react-helmet"; import { useTranslation } from "react-i18next"; import { Link, useSearch } from "@tanstack/react-router"; import { jwtDecode } from "jwt-decode"; import { ROUTE_PATHS } from "@app/const/routes"; import { PasswordStep } from "../LoginPage/components"; export const LoginSsoPage = () => { const { t } = useTranslation(); const search = useSearch({ from: ROUTE_PATHS.Auth.LoginSSO.id }); const token = search.token as string; const [step, setStep] = useState(0); const [password, setPassword] = useState(""); const { username, isUserCompleted } = jwtDecode(token) as any; useEffect(() => { if (isUserCompleted) { setStep(1); } }, []); const renderView = () => { switch (step) { case 0: return
; case 1: return (