Skip to content

Commit 7b813f4

Browse files
authored
fix: Fix/hide description on sidebar when there is no description (#45)
* Now we don't expand description on sidebar when there is no description * Made latest commit prettier * Added is there a task description validation to showing on ui
1 parent cadc948 commit 7b813f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Sidebar/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const Sidebar = ({
7575
return (
7676
<div>
7777
{debug && <DebugBox state={debug} lastAction={debug.lastAction} />}
78-
{(taskDescription || "").length > 1 && (
78+
{taskDescription && (taskDescription || "").length > 1 && (
7979
<TaskDescription description={taskDescription} />
8080
)}
8181
{labelImages && (

src/TaskDescriptionSidebarBox/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const TaskDescriptionSidebarBox = ({ description }) => {
2727
<SidebarBoxContainer
2828
title="Task Description"
2929
icon={<DescriptionIcon style={{ color: grey[700] }} />}
30-
expandedByDefault
30+
expandedByDefault={description && description !== "" ? false : true}
3131
>
3232
<MarkdownContainer>
3333
<Markdown source={description} />

0 commit comments

Comments
 (0)