Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

functionality fix #38

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/view/Components/Taskview/Dailiesview/DailyItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import renderMarkdown from "../markdownRender";

function DailyItem(props: any) {
var text_html = renderMarkdown(props.daily_text);
Copy link
Owner

Choose a reason for hiding this comment

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

Can you add handling of this variable as well, if the props are empty?

var note_html = renderMarkdown(props.daily_notes);
Copy link
Owner

Choose a reason for hiding this comment

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

Why not var note_html = "" instead of deleting this line?


if (props.daily_notes) {
var note_html = renderMarkdown(props.daily_notes);
}

return (
<div className="todo-item" id={props.id}>
<input type="checkbox" className="checkbox" id={props.id} onChange={props.onChange} checked={props.completed} />
Expand Down
7 changes: 6 additions & 1 deletion src/view/Components/Taskview/Habitsview/HabitItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import renderMarkdown from "../markdownRender";

function HabitItem(props: any) {
let habit_text = renderMarkdown(props.habit_text);
Copy link
Owner

Choose a reason for hiding this comment

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

Can you add handling of this variable as well, if the props are empty?

let habit_notes = renderMarkdown(props.habit_notes);
let habit_notes = "";

if (props.habit_notes) {
habit_notes = renderMarkdown(props.habit_notes);
}

return (
<div className="habit-item" id={props.id}>
<div className="habit-button-grp">
Expand Down
7 changes: 6 additions & 1 deletion src/view/Components/Taskview/Rewardview/RewardItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import renderMarkdown from "../markdownRender";

function RewardItem(props: any) {
let reward_text = renderMarkdown(props.reward_text);
Copy link
Owner

Choose a reason for hiding this comment

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

Can you add handling of this variable as well, if the props are empty?

let reward_notes = renderMarkdown(props.reward_notes);
let reward_notes = "";

if (props.reward_notes) {
reward_notes = renderMarkdown(props.reward_notes);
}

return (
<div className="habit-item" id={props.id}>
<div className="habit-button-grp">
Expand Down
7 changes: 6 additions & 1 deletion src/view/Components/Taskview/Todoview/TodoItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import moment from "moment";
function TodoItem(props: any) {
var dueDate = (props.dueDate==null)?"":("Due Date:"+(moment(props.dueDate).format(props.dueDateFormat)));
var text_html = renderMarkdown(props.todo_text);
Copy link
Owner

Choose a reason for hiding this comment

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

Can you add handling of this variable as well, if the props are empty?

var note_html = renderMarkdown(props.todo_notes);
var note_html = "";

if (props.todo_notes) {
renderMarkdown(props.todo_notes);
}

return (
<div className="todo-item" id={props.id}>
<input type="checkbox" className="checkbox" id={props.id} onChange={props.onChange} checked={props.completed}/>
Expand Down