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,14 +1,12 @@
import React, { useState, useContext, useRef } from "react";
import React, { useState, useRef } from "react";
import { Box, Input, Button, Label, Flex } from "theme-ui";
import AuthContext from "../contexts/AuthContext";
import { useAuth } from "../contexts/AuthContext";
import Modal from "../components/Modal";
function AuthModal({ isOpen }) {
const { password, setPassword, setAuthenticationStatus } = useContext(
AuthContext
);
const { password, setPassword, setAuthenticationStatus } = useAuth();
const [tmpPassword, setTempPassword] = useState(password);
function handleChange(event) {