From ff9399b85eee84b0c6a45b7fd12fea3021e66b74 Mon Sep 17 00:00:00 2001 From: Lucid Kobold Date: Tue, 30 Nov 2021 20:12:01 -0600 Subject: [PATCH] Fix typos and spelling --- contexts/dateContect.tsx | 25 ------------------------- contexts/dateContext.tsx | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 contexts/dateContect.tsx create mode 100644 contexts/dateContext.tsx diff --git a/contexts/dateContect.tsx b/contexts/dateContect.tsx deleted file mode 100644 index 83d51e1..0000000 --- a/contexts/dateContect.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from "react"; -import { useState } from "react"; -// TODO: import types - -const DateContext = React.createContext(null); - -function DateContextProvider({ - children, -}: { - children: React.ReactNode; -}): React.ReactElement | null { - const [currentDate] = useState(new Date()); - - const dateProviderValues = { - currentDate, - }; - - return ( - - {children} - - ); -} - -export { DateContextProvider, DateContext }; diff --git a/contexts/dateContext.tsx b/contexts/dateContext.tsx new file mode 100644 index 0000000..e3060b2 --- /dev/null +++ b/contexts/dateContext.tsx @@ -0,0 +1,25 @@ +import * as React from "react"; +import { useState } from "react"; +// TODO: import types + +const CalenderContext = React.createContext(null); + +function CalenderContextProvider({ + children, +}: { + children: React.ReactNode; +}): React.ReactElement | null { + const [today] = useState(new Date()); + + const dateProviderValues = { + today, + }; + + return ( + + {children} + + ); +} + +export { CalenderContextProvider, CalenderContext };