Created types file for calender context.

This commit is contained in:
Lucid Kobold
2022-01-03 13:40:46 -06:00
parent 36aea09aff
commit 71eaedea9d
3 changed files with 72 additions and 79 deletions

View File

@@ -6,11 +6,6 @@ import { getDaysInMonth, getYear, getMonth, isBefore } from "date-fns";
* the day before the current date, leaving the rest of the month empty.
*/
interface Sticker {
date: Date;
sticker: -2 | -1 | 0 | 1 | 2 | null;
}
const generateSticker = (): -2 | -1 | 0 | 1 | 2 => {
const stickerPossibility = [-2, -1, 0, 1, 2];
const sticker = Math.floor(Math.random() * stickerPossibility.length);