Added shared grid context and moved away from calling useContext directly
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useContext } from "react";
|
||||
import React from "react";
|
||||
import { Flex, Box, Text, IconButton, Close, Label } from "theme-ui";
|
||||
import SimpleBar from "simplebar-react";
|
||||
import Case from "case";
|
||||
@@ -11,7 +11,7 @@ import MapTile from "./MapTile";
|
||||
import Link from "../Link";
|
||||
import FilterBar from "../FilterBar";
|
||||
|
||||
import DatabaseContext from "../../contexts/DatabaseContext";
|
||||
import { useDatabase } from "../../contexts/DatabaseContext";
|
||||
|
||||
import useResponsiveLayout from "../../hooks/useResponsiveLayout";
|
||||
|
||||
@@ -32,7 +32,7 @@ function MapTiles({
|
||||
onSearchChange,
|
||||
onMapsGroup,
|
||||
}) {
|
||||
const { databaseStatus } = useContext(DatabaseContext);
|
||||
const { databaseStatus } = useDatabase();
|
||||
const layout = useResponsiveLayout();
|
||||
|
||||
let hasMapState = false;
|
||||
|
||||
Reference in New Issue
Block a user