Added use password option to saved settings
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import React, { useState, useContext, useRef } from "react";
|
||||
import React, { useContext, useRef } from "react";
|
||||
import { Box, Label, Input, Button, Flex, Checkbox } from "theme-ui";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import shortid from "shortid";
|
||||
|
||||
import AuthContext from "../contexts/AuthContext";
|
||||
|
||||
import useSetting from "../helpers/useSetting";
|
||||
|
||||
import Modal from "../components/Modal";
|
||||
|
||||
function StartModal({ isOpen, onRequestClose }) {
|
||||
@@ -15,7 +17,7 @@ function StartModal({ isOpen, onRequestClose }) {
|
||||
setPassword(event.target.value);
|
||||
}
|
||||
|
||||
const [usePassword, setUsePassword] = useState(true);
|
||||
const [usePassword, setUsePassword] = useSetting("game.usePassword");
|
||||
function handleUsePasswordChange(event) {
|
||||
setUsePassword(event.target.checked);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user