Added shared grid context and moved away from calling useContext directly

This commit is contained in:
Mitchell McCaffrey
2021-02-06 13:32:38 +11:00
parent 8991be923e
commit f20173de35
60 changed files with 672 additions and 460 deletions

View File

@@ -1,9 +1,9 @@
import React, { useContext, useRef } from "react";
import React, { 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 { useAuth } from "../contexts/AuthContext";
import useSetting from "../hooks/useSetting";
@@ -11,7 +11,7 @@ import Modal from "../components/Modal";
function StartModal({ isOpen, onRequestClose }) {
let history = useHistory();
const { password, setPassword } = useContext(AuthContext);
const { password, setPassword } = useAuth();
function handlePasswordChange(event) {
setPassword(event.target.value);