diff --git a/ui/App/views/Mods/components/LoadMods.jsx b/ui/App/views/Mods/components/LoadMods.jsx index 466e7077..c5bd8660 100644 --- a/ui/App/views/Mods/components/LoadMods.jsx +++ b/ui/App/views/Mods/components/LoadMods.jsx @@ -5,6 +5,8 @@ import Label from "../../../components/Label"; import {useForm} from "react-hook-form"; import Button from "../../../components/Button"; import modsResource from "../../../../api/resources/mods"; +import modResource from "../../../../api/resources/mods"; +import FactorioLogin from "./AddMod/components/FactorioLogin"; const LoadMods = ({refreshMods}) => { @@ -12,9 +14,12 @@ const LoadMods = ({refreshMods}) => { const {register, reset, handleSubmit} = useForm(); const [isLoading, setIsLoading] = useState(false); const [isDisabled, setIsDisabled] = useState(true); + const [isFactorioAuthenticated, setIsFactorioAuthenticated] = useState(false); useEffect(() => { (async () => { + setIsFactorioAuthenticated(await modResource.portal.status()) + const s = await savesResource.list() setSaves(s); if (s.length > 0) { @@ -39,8 +44,8 @@ const LoadMods = ({refreshMods}) => { .catch(() => setIsLoading(false)) } - return ( -
- ) + :