Updated to use context.

This commit is contained in:
Lucid Kobold
2021-11-30 21:26:51 -06:00
parent cb213556ff
commit 10c474c50d
3 changed files with 12 additions and 38 deletions

View File

@@ -1,10 +1,11 @@
import React from "react";
import React, { useContext } from "react";
import { Heading, HStack, IconButton } from "@chakra-ui/react";
import { Icon } from "@iconify/react";
import { format } from "date-fns";
import { CalenderContext } from "../../contexts/CalenderContext";
const CalenderNav = (): JSX.Element => {
const today = new Date();
const { today } = useContext(CalenderContext);
const currentMonth = format(today, "LLLL uuuu");