Added more todos.
This commit is contained in:
@@ -33,6 +33,12 @@ const CalenderNav = (): JSX.Element => {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* TODO: Add logic to remove the nav buttons.
|
||||
* Do not show next button for current month.
|
||||
* Do not show prev when there is nothing left to see in the past.
|
||||
*/
|
||||
|
||||
return (
|
||||
<HStack spacing={10} as="nav" w="auto" h="10vh" textAlign="center">
|
||||
<IconButton
|
||||
|
||||
@@ -47,6 +47,12 @@ const Day = (props: DayProps): JSX.Element => {
|
||||
// This handles the modal for this date.
|
||||
const [isOpen, setIsOpen] = useState<boolean>(false);
|
||||
|
||||
/**
|
||||
* TODO: Add logic to remove the onClick within overflow dates.
|
||||
* Do not give dates for the next month an onClick.
|
||||
* Do not give dates in the past an onClick there is nothing before that month.
|
||||
*/
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
{isOverflow && (
|
||||
|
||||
@@ -219,6 +219,17 @@ const CalenderContextProvider = ({
|
||||
setSelectedMonthInfo(output);
|
||||
};
|
||||
|
||||
// TODO: Add a function that validated if a date has at least one sticker in it. Use that within the nav function.
|
||||
|
||||
// TODO: Add a function that will give the closest date, if available, when the nav func detects an empty month.
|
||||
// Use the account creation date to aid with this.
|
||||
|
||||
/**
|
||||
* TODO: Add logic that prevents navigation to the future and too far in the past.
|
||||
* Update to use a promise and return appropriate errors. Display those errors on the front end.
|
||||
* Update the use of this function on the front to handle the fails of the promise.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Updated the selectedDate state when given the appropriate object.
|
||||
* @param {UpdateCalendarProps} input An object with year, month,
|
||||
|
||||
@@ -62,6 +62,12 @@ const DateRoute: React.FC<unknown> = () => {
|
||||
return <ErrorPage statusCode={404} />;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: Update to disallow navigation in the future and too far in the past.
|
||||
* Update so that a date given in the future take the user to /now to today's date.
|
||||
* Update so that a date given beyond the last valid date will bring the user to the last month that has stickers within it.
|
||||
*/
|
||||
|
||||
return (
|
||||
<Box textAlign="center" w="100%" h="auto" pt="50px" pb="10vh">
|
||||
<CalenderContextProvider>
|
||||
|
||||
Reference in New Issue
Block a user