Skip to content

Commit f18ca14

Browse files
fix(web): Hide someday event add button when dragging (#521)
1 parent f0b60a6 commit f18ca14

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

packages/web/src/views/Calendar/components/Sidebar/SomedayTab/SomedayEvents/SomedayEventsContainer/SomedayEventsContainer.tsx

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,23 @@ export const SomedayEventsContainer: FC<Props> = ({
7878
{provided.placeholder}
7979

8080
{!isDraftingNew && (
81-
<TooltipWrapper
82-
description={
83-
category === Categories_Event.SOMEDAY_MONTH
84-
? "Add to month"
85-
: "Add to week"
86-
}
87-
onClick={() => onPlaceholderClick(category)}
88-
shortcut={
89-
category === Categories_Event.SOMEDAY_MONTH ? "M" : "W"
90-
}
91-
>
92-
<EventPlaceholder>
93-
<Text size="l">+</Text>
94-
</EventPlaceholder>
95-
</TooltipWrapper>
81+
<div style={{ opacity: state.isDragging ? 0 : 1 }}>
82+
<TooltipWrapper
83+
description={
84+
category === Categories_Event.SOMEDAY_MONTH
85+
? "Add to month"
86+
: "Add to week"
87+
}
88+
onClick={() => onPlaceholderClick(category)}
89+
shortcut={
90+
category === Categories_Event.SOMEDAY_MONTH ? "M" : "W"
91+
}
92+
>
93+
<EventPlaceholder>
94+
<Text size="l">+</Text>
95+
</EventPlaceholder>
96+
</TooltipWrapper>
97+
</div>
9698
)}
9799

98100
{isDraftingThisCategory && state.draft && (

0 commit comments

Comments
 (0)