Disabled export button when database is unavailable
This commit is contained in:
parent
78b8653986
commit
5d1fdaedd8
@ -22,7 +22,7 @@ import ConfirmModal from "./ConfirmModal";
|
|||||||
import ImportExportModal from "./ImportExportModal";
|
import ImportExportModal from "./ImportExportModal";
|
||||||
|
|
||||||
function SettingsModal({ isOpen, onRequestClose }) {
|
function SettingsModal({ isOpen, onRequestClose }) {
|
||||||
const { database } = useContext(DatabaseContext);
|
const { database, databaseStatus } = useContext(DatabaseContext);
|
||||||
const { userId } = useContext(AuthContext);
|
const { userId } = useContext(AuthContext);
|
||||||
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);
|
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);
|
||||||
const [labelSize, setLabelSize] = useSetting("map.labelSize");
|
const [labelSize, setLabelSize] = useSetting("map.labelSize");
|
||||||
@ -131,6 +131,7 @@ function SettingsModal({ isOpen, onRequestClose }) {
|
|||||||
<Button
|
<Button
|
||||||
sx={{ flexGrow: 1 }}
|
sx={{ flexGrow: 1 }}
|
||||||
onClick={() => setIsImportExportModalOpen(true)}
|
onClick={() => setIsImportExportModalOpen(true)}
|
||||||
|
disabled={databaseStatus !== "loaded"}
|
||||||
>
|
>
|
||||||
Import / Export Database
|
Import / Export Database
|
||||||
</Button>
|
</Button>
|
||||||
|
Loading…
Reference in New Issue
Block a user