fix: Disable quick timer actions for viewers

pull/304/head
Maksim Eltyshev 3 years ago
parent e1a0b635ea
commit e3d00c8791

@ -125,7 +125,7 @@ const Card = React.memo(
startedAt={timer.startedAt}
total={timer.total}
size="tiny"
onClick={handleToggleTimerClick}
onClick={canEdit ? handleToggleTimerClick : undefined}
/>
</span>
)}

@ -298,6 +298,7 @@ const CardModal = React.memo(
<Timer startedAt={timer.startedAt} total={timer.total} />
)}
</span>
{canEdit && (
<button
onClick={handleToggleTimerClick}
type="button"
@ -309,6 +310,7 @@ const CardModal = React.memo(
className={styles.addAttachment}
/>
</button>
)}
</div>
)}
</div>

Loading…
Cancel
Save