Added more todos.

This commit is contained in:
Lucid Kobold
2022-01-05 12:54:11 -06:00
parent 628b0ce9f3
commit 342507ad05
4 changed files with 29 additions and 0 deletions

View File

@@ -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 ( return (
<HStack spacing={10} as="nav" w="auto" h="10vh" textAlign="center"> <HStack spacing={10} as="nav" w="auto" h="10vh" textAlign="center">
<IconButton <IconButton

View File

@@ -47,6 +47,12 @@ const Day = (props: DayProps): JSX.Element => {
// This handles the modal for this date. // This handles the modal for this date.
const [isOpen, setIsOpen] = useState<boolean>(false); 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 ( return (
<Fragment> <Fragment>
{isOverflow && ( {isOverflow && (

View File

@@ -219,6 +219,17 @@ const CalenderContextProvider = ({
setSelectedMonthInfo(output); 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. * Updated the selectedDate state when given the appropriate object.
* @param {UpdateCalendarProps} input An object with year, month, * @param {UpdateCalendarProps} input An object with year, month,

View File

@@ -62,6 +62,12 @@ const DateRoute: React.FC<unknown> = () => {
return <ErrorPage statusCode={404} />; 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 ( return (
<Box textAlign="center" w="100%" h="auto" pt="50px" pb="10vh"> <Box textAlign="center" w="100%" h="auto" pt="50px" pb="10vh">
<CalenderContextProvider> <CalenderContextProvider>