Skip to content

Commit fb060b5

Browse files
committed
applied coderabbit suggestion
1 parent 90487ee commit fb060b5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/components/QuranicCalendar/WeeklyVerses/ActionButtons.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
4343
logButtonClick('quran_calendar_read_online');
4444
};
4545

46-
const markAsCompletedLabel = isMobileView
47-
? '\u2713'
48-
: !isCompleted
49-
? t('mark-as-completed')
50-
: t('week-completed');
46+
const getMarkAsCompletedLabel = () => {
47+
if (isMobileView) return '\u2713';
48+
return isCompleted ? t('week-completed') : t('mark-as-completed');
49+
};
50+
51+
const markAsCompletedLabel = getMarkAsCompletedLabel();
5152

5253
return (
5354
<div className={styles.actionButtons}>

0 commit comments

Comments
 (0)