Moved stickers state to redux. Removed unneded type definitions. Refactored components to accomdate changes in types and interfaces.

This commit is contained in:
Lucid Kobold
2022-06-13 15:24:59 -05:00
parent 8654d7ac79
commit 06df367277
13 changed files with 156 additions and 157 deletions

View File

@@ -44,3 +44,9 @@ interface UpdateCalendarProps {
month: number;
day: number;
}
interface SelectedDateInfo {
date: string;
title: string;
layout: MonthLayout;
}

View File

@@ -1,8 +1,3 @@
interface StickersContextState {
stickersMonth: StickerDays;
addEditSticker: (date: Date, sticker: ValidStickerVal) => Sticker;
}
type StickerVal = -2 | -1 | 0 | 1 | 2 | null;
type ValidStickerVal = -2 | -1 | 0 | 1 | 2;
@@ -14,15 +9,10 @@ interface AddEditStickerProps {
interface Sticker {
id: string;
date: Date;
date: string;
sticker: StickerVal;
edited: boolean;
manual: boolean;
}
type StickerDays = Sticker[];
interface MonthSticker {
date: Date;
month: Sticker[];
}