Skip to content

Commit

Permalink
chore: fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
doprz committed Feb 15, 2025
1 parent 4ba681d commit bcb9dfe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/views/components/common/ScheduleListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
RadioButton,
Trash,
} from '@phosphor-icons/react';
import { background } from '@shared/messages';
import type { UserSchedule } from '@shared/types/UserSchedule';
import Text from '@views/components/common/Text/Text';
import { useEnforceScheduleLimit } from '@views/hooks/useEnforceScheduleLimit';
Expand Down Expand Up @@ -70,7 +71,12 @@ export default function ScheduleListItem({ schedule, onClick }: ScheduleListItem
if (editorValue.trim() !== '' && editorValue.trim() !== schedule.name) {
schedule.name = (await renameSchedule(schedule.id, editorValue.trim())) as string;

if (Math.random() < 1) {
if (schedule.name === '404') {
const url = chrome.runtime.getURL('/404.html');
background.openNewTab({ url });
}

if (Math.random() < 0.002) {
showDialog({
title: 'Schedule name already taken',
description: (
Expand Down

0 comments on commit bcb9dfe

Please sign in to comment.