From 261ec3e104187fc81b0ea69c10286a41ac69bd82 Mon Sep 17 00:00:00 2001 From: Shaine ONeal Date: Thu, 8 Aug 2024 17:22:02 -0400 Subject: [PATCH 1/2] functionality fix --- src/view/Components/Taskview/Dailiesview/DailyItem.tsx | 4 +++- src/view/Components/Taskview/Habitsview/HabitItem.tsx | 3 ++- src/view/Components/Taskview/Rewardview/RewardItem.tsx | 3 ++- src/view/Components/Taskview/Todoview/TodoItem.tsx | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/view/Components/Taskview/Dailiesview/DailyItem.tsx b/src/view/Components/Taskview/Dailiesview/DailyItem.tsx index 4443cd3..bd347fb 100644 --- a/src/view/Components/Taskview/Dailiesview/DailyItem.tsx +++ b/src/view/Components/Taskview/Dailiesview/DailyItem.tsx @@ -4,7 +4,9 @@ import renderMarkdown from "../markdownRender"; function DailyItem(props: any) { var text_html = renderMarkdown(props.daily_text); - var note_html = renderMarkdown(props.daily_notes); + if (props.daily_notes) { + var note_html = renderMarkdown(props.daily_notes); + } return (
diff --git a/src/view/Components/Taskview/Habitsview/HabitItem.tsx b/src/view/Components/Taskview/Habitsview/HabitItem.tsx index 37d672c..47bb87e 100644 --- a/src/view/Components/Taskview/Habitsview/HabitItem.tsx +++ b/src/view/Components/Taskview/Habitsview/HabitItem.tsx @@ -3,7 +3,8 @@ import renderMarkdown from "../markdownRender"; function HabitItem(props: any) { let habit_text = renderMarkdown(props.habit_text); - let habit_notes = renderMarkdown(props.habit_notes); + let habit_notes = ""; + if (props.habit_notes) habit_notes = renderMarkdown(props.habit_notes); return (
diff --git a/src/view/Components/Taskview/Rewardview/RewardItem.tsx b/src/view/Components/Taskview/Rewardview/RewardItem.tsx index 5f331e2..d62e5df 100644 --- a/src/view/Components/Taskview/Rewardview/RewardItem.tsx +++ b/src/view/Components/Taskview/Rewardview/RewardItem.tsx @@ -3,7 +3,8 @@ import renderMarkdown from "../markdownRender"; function RewardItem(props: any) { let reward_text = renderMarkdown(props.reward_text); - let reward_notes = renderMarkdown(props.reward_notes); + let reward_notes = ""; + if (props.reward_notes) reward_notes = renderMarkdown(props.reward_notes); return (
diff --git a/src/view/Components/Taskview/Todoview/TodoItem.tsx b/src/view/Components/Taskview/Todoview/TodoItem.tsx index 7c1653b..586cd06 100644 --- a/src/view/Components/Taskview/Todoview/TodoItem.tsx +++ b/src/view/Components/Taskview/Todoview/TodoItem.tsx @@ -6,7 +6,8 @@ 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); - var note_html = renderMarkdown(props.todo_notes); + var note_html = ""; + if (props.todo_notes) renderMarkdown(props.todo_notes); return (
From 300e388e7fd1b84b35270a3eae63318fa3213898 Mon Sep 17 00:00:00 2001 From: Shaine ONeal Date: Sun, 11 Aug 2024 15:19:13 -0400 Subject: [PATCH 2/2] chore: standardizing formatting --- src/view/Components/Taskview/Dailiesview/DailyItem.tsx | 2 ++ src/view/Components/Taskview/Habitsview/HabitItem.tsx | 6 +++++- src/view/Components/Taskview/Rewardview/RewardItem.tsx | 6 +++++- src/view/Components/Taskview/Todoview/TodoItem.tsx | 6 +++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/view/Components/Taskview/Dailiesview/DailyItem.tsx b/src/view/Components/Taskview/Dailiesview/DailyItem.tsx index bd347fb..6b173b6 100644 --- a/src/view/Components/Taskview/Dailiesview/DailyItem.tsx +++ b/src/view/Components/Taskview/Dailiesview/DailyItem.tsx @@ -4,9 +4,11 @@ import renderMarkdown from "../markdownRender"; function DailyItem(props: any) { var text_html = renderMarkdown(props.daily_text); + if (props.daily_notes) { var note_html = renderMarkdown(props.daily_notes); } + return (
diff --git a/src/view/Components/Taskview/Habitsview/HabitItem.tsx b/src/view/Components/Taskview/Habitsview/HabitItem.tsx index 47bb87e..657e844 100644 --- a/src/view/Components/Taskview/Habitsview/HabitItem.tsx +++ b/src/view/Components/Taskview/Habitsview/HabitItem.tsx @@ -4,7 +4,11 @@ import renderMarkdown from "../markdownRender"; function HabitItem(props: any) { let habit_text = renderMarkdown(props.habit_text); let habit_notes = ""; - if (props.habit_notes) habit_notes = renderMarkdown(props.habit_notes); + + if (props.habit_notes) { + habit_notes = renderMarkdown(props.habit_notes); + } + return (
diff --git a/src/view/Components/Taskview/Rewardview/RewardItem.tsx b/src/view/Components/Taskview/Rewardview/RewardItem.tsx index d62e5df..42896eb 100644 --- a/src/view/Components/Taskview/Rewardview/RewardItem.tsx +++ b/src/view/Components/Taskview/Rewardview/RewardItem.tsx @@ -4,7 +4,11 @@ import renderMarkdown from "../markdownRender"; function RewardItem(props: any) { let reward_text = renderMarkdown(props.reward_text); let reward_notes = ""; - if (props.reward_notes) reward_notes = renderMarkdown(props.reward_notes); + + if (props.reward_notes) { + reward_notes = renderMarkdown(props.reward_notes); + } + return (
diff --git a/src/view/Components/Taskview/Todoview/TodoItem.tsx b/src/view/Components/Taskview/Todoview/TodoItem.tsx index 586cd06..4344383 100644 --- a/src/view/Components/Taskview/Todoview/TodoItem.tsx +++ b/src/view/Components/Taskview/Todoview/TodoItem.tsx @@ -7,7 +7,11 @@ function TodoItem(props: any) { var dueDate = (props.dueDate==null)?"":("Due Date:"+(moment(props.dueDate).format(props.dueDateFormat))); var text_html = renderMarkdown(props.todo_text); var note_html = ""; - if (props.todo_notes) renderMarkdown(props.todo_notes); + + if (props.todo_notes) { + renderMarkdown(props.todo_notes); + } + return (