Merge branch 'stickers' of https://github.com/LucidKobold/LCM-Potty-Chart into stickers

This commit is contained in:
Lucid Kobold
2022-01-27 13:54:42 -06:00
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import React, { createContext, useState, ReactNode } from "react";
import stickersSeeder from "../data/stickerSeeder";
const StickersContext = createContext({} as StickersContextState);
const StickersContextProvider = ({
children
}: {
children: ReactNode;
}): JSX.Element => {
const [stickersMonth, setStickersMonth] = useState<StickerDays>(
stickersSeeder()
);
// TODO: Add stickers functions here. (Add and edit stickers).
// TODO: Add stickers validation function here.
const stickersContextValues = {
stickersMonth
};
return (
<StickersContext.Provider value={stickersContextValues}>
{children}
</StickersContext.Provider>
);
};
export { StickersContextProvider, StickersContext };

3
types/StickerContext.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
interface StickersContextState {
stickersMonth: StickerDays;
}