Getting and setting completed tutorial cookie. Working on properly setting and updating a loading state.
This commit is contained in:
@@ -7,7 +7,17 @@ import findValidDateRange from "../../../lib/findValidDateRange";
|
||||
import DatePicker from "./DatePicker";
|
||||
import { useAppSelector } from "../../app/hooks";
|
||||
|
||||
const CalenderNav = (): JSX.Element => {
|
||||
interface CalenderNavProps {
|
||||
isLoading: boolean;
|
||||
title: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} isLoading is the component loading?
|
||||
* @param {string} title the title for the current date.
|
||||
*/
|
||||
|
||||
const CalenderNav = ({ title, isLoading }: CalenderNavProps): JSX.Element => {
|
||||
const selectedDate = useAppSelector(
|
||||
(state) => state.calender.selectedDateInfo
|
||||
);
|
||||
@@ -46,7 +56,7 @@ const CalenderNav = (): JSX.Element => {
|
||||
icon={<Icon icon="akar-icons:chevron-left" />}
|
||||
onClick={() => handleNavButtons("prev")}
|
||||
/>
|
||||
<DatePicker />
|
||||
<DatePicker isLoading={isLoading} title={title} />
|
||||
<IconButton
|
||||
isDisabled={isSameMonth(selectedDateObj, validEnd)}
|
||||
aria-label="Next Month"
|
||||
|
||||
Reference in New Issue
Block a user