This repository has been archived on 2025-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
lcm-potty-chart/contexts/StickerContext.tsx
Lucid Kobold 0b05eeb9ee Added todos
2022-01-12 18:49:47 -06:00

31 lines
735 B
TypeScript

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 };