Skip to content

Self-hosted, plugin-based server management.

fix: Auth ref error

LukeGus9ca7df654207
diff --git a/src/ui/desktop/authentication/Auth.tsx b/src/ui/desktop/authentication/Auth.tsx
index ab7b496ca..fb894adc1 100644
--- a/src/ui/desktop/authentication/Auth.tsx
+++ b/src/ui/desktop/authentication/Auth.tsx
@@ -105,6 +105,13 @@ export function Auth({
const [totpLoading, setTotpLoading] = 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 () => {
try {
const meRes = await getUserInfo();
@@ -624,13 +631,6 @@ export function Auth({
</svg>
);
- const [showServerConfig, setShowServerConfig] = useState<boolean | null>(
- null,
- );
- const [currentServerUrl, setCurrentServerUrl] = useState<string>("");
- const [dbConnectionFailed, setDbConnectionFailed] = useState(false);
- const [dbHealthChecking, setDbHealthChecking] = useState(false);
-
useEffect(() => {
if (dbConnectionFailed) {
toast.error(t("errors.databaseConnection"));