Skip to content

Calendar Countdown App#7

Open
wenxin-p wants to merge 3 commits intorocketacademy:mainfrom
wenxin-p:main
Open

Calendar Countdown App#7
wenxin-p wants to merge 3 commits intorocketacademy:mainfrom
wenxin-p:main

Conversation

@wenxin-p
Copy link

@wenxin-p wenxin-p commented Nov 9, 2024

No description provided.

</div>
<h1>Hello User.</h1>
<h3>Start by selecting a date for your event.</h3>
<CalendarFunc></CalendarFunc>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<CalendarFunc></CalendarFunc>
<CalendarFunc />

@@ -0,0 +1,156 @@
.react-calendar {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this .css file is not a component, we shouldn't write it in capital letter. If this is supposed to be attached to Calendar.jsx component, then I recommend placing it in a new folder /components/Calendar alongside the component itself.

import Col from "react-bootstrap/Col";

const CalendarFunc = () => {
const [selectedDate, setSelectedDate] = useState(null);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe can use new Date() as default?

const [showChecklist, setShowChecklist] = useState(false);
const [showMemo, setShowMemo] = useState(false);

// Function to select the date.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is a bit redundant, since the function name tells me the same

setSelectedDate(date);
};

// Function to handle Input Change.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant comment

}
};

// Allows users to remove a task.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Allows users to remove a task.

setTasks(taskList);
};

//Allow users to choose between adding more tasks or be done with adding tasks.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not match the code somehow. Seems like this comment should be removed as well

setIsAddTaskCompleted(true);
};

const handleContAdding = () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the function name here is unclear. We should be more specific. Not sure what Cont is

<button>{editTask ? "Update Task" : "Add Task"}</button>
</form>
)}
<ul>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if tasks is empty, then you render an empty <ul> here

))}
</ul>

{/* Conditional Rendering */}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{/* Conditional Rendering */}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants