Skip to content

Commit

Permalink
fix: Fix Scheduled DataDocs Only toggle (pinterest#1149)
Browse files Browse the repository at this point in the history
  • Loading branch information
baumandm authored and rohan-sh1 committed Apr 11, 2023
1 parent cda7787 commit 02a1ee9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const DataDocScheduleItem: React.FC<IDataDocScheduleItemProps> = ({
};

const { doc, schedule, last_record: lastRecord } = docWithSchedule;
const isScheduleDisabled = schedule?.enabled === false;

return (
<div className="DataDocScheduleItem mb12">
Expand All @@ -107,7 +108,7 @@ export const DataDocScheduleItem: React.FC<IDataDocScheduleItemProps> = ({
<AccentText
weight="bold"
size="med"
color={schedule.enabled ? 'text' : 'lightest'}
color={isScheduleDisabled ? 'lightest' : 'text'}
>
{doc.title}
</AccentText>
Expand Down

0 comments on commit 02a1ee9

Please sign in to comment.