Skip to content

Commit

Permalink
fix: Fix/hide description on sidebar when there is no description (#45)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
puskuruk committed Apr 25, 2020
1 parent cadc948 commit 7b813f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Sidebar/index.js
Expand Up @@ -75,7 +75,7 @@ export const Sidebar = ({
return (
<div>
{debug && <DebugBox state={debug} lastAction={debug.lastAction} />}
{(taskDescription || "").length > 1 && (
{taskDescription && (taskDescription || "").length > 1 && (
<TaskDescription description={taskDescription} />
)}
{labelImages && (
Expand Down
2 changes: 1 addition & 1 deletion src/TaskDescriptionSidebarBox/index.js
Expand Up @@ -27,7 +27,7 @@ export const TaskDescriptionSidebarBox = ({ description }) => {
<SidebarBoxContainer
title="Task Description"
icon={<DescriptionIcon style={{ color: grey[700] }} />}
expandedByDefault
expandedByDefault={description && description !== "" ? false : true}
>
<MarkdownContainer>
<Markdown source={description} />
Expand Down

0 comments on commit 7b813f4

Please sign in to comment.