fix: Auth ref error

This commit is contained in:
LukeGus
2025-11-05 11:43:14 -06:00
parent a27d8f264e
commit 9ca7df6542

View File

@@ -105,6 +105,13 @@ export function Auth({
const [totpLoading, setTotpLoading] = useState(false); const [totpLoading, setTotpLoading] = useState(false);
const [webviewAuthSuccess, setWebviewAuthSuccess] = useState(false); const [webviewAuthSuccess, setWebviewAuthSuccess] = useState(false);
const [showServerConfig, setShowServerConfig] = useState<boolean | null>(
null,
);
const [currentServerUrl, setCurrentServerUrl] = useState<string>("");
const [dbConnectionFailed, setDbConnectionFailed] = useState(false);
const [dbHealthChecking, setDbHealthChecking] = useState(false);
const handleElectronAuthSuccess = useCallback(async () => { const handleElectronAuthSuccess = useCallback(async () => {
try { try {
const meRes = await getUserInfo(); const meRes = await getUserInfo();
@@ -624,13 +631,6 @@ export function Auth({
</svg> </svg>
); );
const [showServerConfig, setShowServerConfig] = useState<boolean | null>(
null,
);
const [currentServerUrl, setCurrentServerUrl] = useState<string>("");
const [dbConnectionFailed, setDbConnectionFailed] = useState(false);
const [dbHealthChecking, setDbHealthChecking] = useState(false);
useEffect(() => { useEffect(() => {
if (dbConnectionFailed) { if (dbConnectionFailed) {
toast.error(t("errors.databaseConnection")); toast.error(t("errors.databaseConnection"));