Added shared grid context and moved away from calling useContext directly
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user