diff --git a/.env b/.env index c7c3ef6..54a8f3c 100755 --- a/.env +++ b/.env @@ -18,7 +18,8 @@ REACT_APP_RESOURCES="Resources" REACT_APP_HISTORY="History" REACT_APP_TRACKING_SHOW=1 +REACT_APP_HISTORY_SHOW=1 REACT_APP_RESOURCES_SHOW=1 -REACT_APP_VERSION_NO="DEF-CONFIG" \ No newline at end of file +REACT_APP_VERSION_NO="DEF-CONFIG" diff --git a/.env.development b/.env.development index 32ad057..53af7cc 100644 --- a/.env.development +++ b/.env.development @@ -18,6 +18,7 @@ REACT_APP_RESOURCES="Resources" REACT_APP_HISTORY="History" REACT_APP_TRACKING_SHOW=1 +REACT_APP_HISTORY_SHOW=1 REACT_APP_RESOURCES_SHOW=1 diff --git a/.env.production b/.env.production index 7fa3e8e..4c04cb4 100644 --- a/.env.production +++ b/.env.production @@ -18,6 +18,7 @@ REACT_APP_RESOURCES="Resources" REACT_APP_HISTORY="History" REACT_APP_TRACKING_SHOW=0 +REACT_APP_HISTORY_SHOW=0 REACT_APP_RESOURCES_SHOW=0 diff --git a/src/components/Calendar/CalendarTable.jsx b/src/components/Calendar/CalendarTable.jsx index 6e77c7a..21ef4c1 100755 --- a/src/components/Calendar/CalendarTable.jsx +++ b/src/components/Calendar/CalendarTable.jsx @@ -21,11 +21,11 @@ export default function CalendarTable({ className }) { const [value, onChange] = useState(new Date()); // value of calendar date and onchange handler for calendar const [remDate, setRemDate] = useState([]) // for holding dates on reminders to display on calendar - const reminderApi = new usersService(); // instantiating the API SERVICE + const calenderApi = new usersService(); // instantiating the API SERVICE const getUserReminders = async () => { try { - const res = await reminderApi.getUserReminders(); + const res = await calenderApi.getUserReminders(); if(res.status == 200 && res.data.status > 0){ setRemDate(res.data.reminders) setIsLoading(false) @@ -117,32 +117,46 @@ export default function CalendarTable({ className }) { ); } -const ReminderThumbnail = ({reminders}) => { +/** + * Renders a list of reminder thumbnails. + * Each thumbnail displays the reminder's category image, description, and start date. + + * Each object should have the following properties: + * - category (string): The category of the reminder. + * - description (string): The description of the reminder. + * - start_date (string): The start date of the reminder. + */ +const ReminderThumbnail = ({ reminders }) => { + const getThumbnailImage = (category) => { + if (!category) { + return dataImage1; + } + return localImgLoad(`images/${category}.png`); + }; + return (