import styles from "./auth.module.scss"; import { IconButton } from "@/app/components/button/button"; import { useNavigate } from "react-router-dom"; import { Path } from "@/app/constant"; import { useAccessStore } from "@/app/store"; import Locale from "@/app/locales"; import BotIcon from "@/app/icons/bot.svg"; import { useEffect } from "react"; import { getClientConfig } from "@/app/config/client"; export function AuthPage() { const navigate = useNavigate(); const accessStore = useAccessStore(); const goHome = () => navigate(Path.Home); const goChat = () => navigate(Path.Chat); const resetAccessCode = () => { accessStore.update((access) => { access.openaiApiKey = ""; access.accessCode = ""; }); }; // Reset access code to empty string useEffect(() => { if (getClientConfig()?.isApp) { navigate(Path.Settings); } // eslint-disable-next-line react-hooks/exhaustive-deps }, []); return (