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";
|
||||
|
||||
function SettingsModal({ isOpen, onRequestClose }) {
|
||||
const { database } = useContext(DatabaseContext);
|
||||
const { database, databaseStatus } = useContext(DatabaseContext);
|
||||
const { userId } = useContext(AuthContext);
|
||||
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);
|
||||
const [labelSize, setLabelSize] = useSetting("map.labelSize");
|
||||
@ -131,6 +131,7 @@ function SettingsModal({ isOpen, onRequestClose }) {
|
||||
<Button
|
||||
sx={{ flexGrow: 1 }}
|
||||
onClick={() => setIsImportExportModalOpen(true)}
|
||||
disabled={databaseStatus !== "loaded"}
|
||||
>
|
||||
Import / Export Database
|
||||
</Button>
|
||||
|
Loading…
Reference in New Issue
Block a user