Formatting
This commit is contained in:
@@ -37,8 +37,12 @@ const CalenderContextProvider = ({
|
|||||||
|
|
||||||
// Selected month & year
|
// Selected month & year
|
||||||
const [selectedMonth, setSelectedMonth] = useState<Date>(today);
|
const [selectedMonth, setSelectedMonth] = useState<Date>(today);
|
||||||
const [endOfSelectedMonth, SetEndOfSelectedDMonth] = useState<Date>(endOfMonth(selectedMonth));
|
const [endOfSelectedMonth, SetEndOfSelectedDMonth] = useState<Date>(
|
||||||
const [lastDayOfSelectedMonth, setLastDayOfSelectedMonth] = useState<number>(getDate(endOfSelectedMonth));
|
endOfMonth(selectedMonth)
|
||||||
|
);
|
||||||
|
const [lastDayOfSelectedMonth, setLastDayOfSelectedMonth] = useState<number>(
|
||||||
|
getDate(endOfSelectedMonth)
|
||||||
|
);
|
||||||
|
|
||||||
const [daysOfMonth, setDaysOfMonth] = useState<[number] | [null]>([null]);
|
const [daysOfMonth, setDaysOfMonth] = useState<[number] | [null]>([null]);
|
||||||
|
|
||||||
@@ -87,16 +91,14 @@ const CalenderContextProvider = ({
|
|||||||
//TODO: Create an object of arrays that will align with the days on the week. Make two sets for each start of the week setting.
|
//TODO: Create an object of arrays that will align with the days on the week. Make two sets for each start of the week setting.
|
||||||
|
|
||||||
// Navigation
|
// Navigation
|
||||||
const prevMonth = (): void => {
|
const prevMonth = (): void => {};
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const calenderContextValues = {
|
const calenderContextValues = {
|
||||||
today,
|
today,
|
||||||
selectedMonth,
|
selectedMonth,
|
||||||
daysOfMonth,
|
daysOfMonth,
|
||||||
daysOfWeek,
|
daysOfWeek,
|
||||||
prevMonth
|
prevMonth,
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user