Imported the new context to calendar componenet.

This commit is contained in:
Lucid Kobold
2021-12-29 13:52:39 -06:00
parent ee481158f0
commit 96a9bedf9a
4 changed files with 44 additions and 31 deletions

View File

@@ -3,12 +3,11 @@ import { Box, Text } from "@chakra-ui/react";
import { NewCalenderContext } from "../../contexts/NewCalenderContext";
const NewContext = (): JSX.Element => {
const { selectedMonthInfo } = useContext(NewCalenderContext);
const { date } = selectedMonthInfo;
const { selectedDate } = useContext(NewCalenderContext);
return (
<Box>
<Text>{`New Context Was Provided. Selected date is ${date}`}</Text>
<Text>{`New Context Was Provided. Selected date is ${selectedDate}`}</Text>
</Box>
);
};