fix: Auth ref error
This commit is contained in:
1 parent
a27d8f264e
commit
9ca7df6542
1 file changed
+7
-7
@@ -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"));
|
||||||
|
|||||||
Reference in new issue
Block a user