diff --git a/components/calender/CalenderNav.tsx b/components/calender/CalenderNav.tsx index d7c3b73..74ea796 100644 --- a/components/calender/CalenderNav.tsx +++ b/components/calender/CalenderNav.tsx @@ -37,6 +37,7 @@ 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. + * (Creation date of a chart) */ return ( diff --git a/components/calender/Day.tsx b/components/calender/Day.tsx index 9e7add2..19c3482 100644 --- a/components/calender/Day.tsx +++ b/components/calender/Day.tsx @@ -55,6 +55,7 @@ const Day = ({ * 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. + * (Creation date of a chart) */ return ( diff --git a/components/calender/index.tsx b/components/calender/index.tsx index 7b663d7..8c3ac88 100644 --- a/components/calender/index.tsx +++ b/components/calender/index.tsx @@ -4,7 +4,6 @@ import CalenderNav from "./CalenderNav"; import { CalenderContext } from "../../contexts/CalenderContext"; import { format } from "date-fns"; import Day from "./Day"; -// TODO: import types const Calender = (newDate?: UpdateCalendarProps): JSX.Element => { const { selectedDate, layout, updateDate } = useContext(CalenderContext); diff --git a/contexts/CalenderContext.tsx b/contexts/CalenderContext.tsx index 98841a3..c1488e5 100644 --- a/contexts/CalenderContext.tsx +++ b/contexts/CalenderContext.tsx @@ -219,20 +219,20 @@ const CalenderContextProvider = ({ setSelectedMonthInfo(output); }; - // TODO: Make a function that will give the valid date range for the front end. Either starting at the account creation or the oldest month with stickers. + // TODO: Make a function that will give the valid date range for the front end. Either starting at the chart creation date or the oldest month with stickers (when enabled in filters). - // 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 validated if a date has at least one sticker in it. Use that within the nav function (when filter is enabled). // 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. + // Use the chart creation date to aid with this. (When filter is enabled) /** - * TODO: Add logic that prevents navigation to the future and too far in the past. + * TODO: Add logic that prevents navigation to the future and too far in the past. (Use chart creation date) * 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. */ - // TODO: Update the calender update function that will take in a direction so that the the navigation buttons will take the user to the next month with stickers. Assuming there was a gap with empty months. + // TODO: (When filter is enabled) Update the calender update function that will take in a direction so that the the navigation buttons will take the user to the next month with stickers. Assuming there was a gap with empty months. /** * Updated the selectedDate state when given the appropriate object. diff --git a/pages/calendar/[...date].tsx b/pages/calendar/[...date].tsx index 3a5a771..6f72749 100644 --- a/pages/calendar/[...date].tsx +++ b/pages/calendar/[...date].tsx @@ -65,7 +65,8 @@ const DateRoute: React.FC = () => { /** * 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. + * Update so that a date given beyond the last valid date will bring the user to the + * last month that has stickers within it (When filter is enabled) or to the creation date of the chart.. */ return (