2020-10-15 03:13:36 +00:00
|
|
|
import { Schedule } from '@/api/server/schedules/getServerSchedules';
|
2022-06-20 19:28:27 +00:00
|
|
|
import classNames from 'classnames';
|
2020-10-15 03:13:36 +00:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
cron: Schedule['cron'];
|
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const ScheduleCronRow = ({ cron, className }: Props) => (
|
2022-06-20 19:28:27 +00:00
|
|
|
<div className={classNames('flex', className)}>
|
|
|
|
<div className={'w-1/5 sm:w-auto text-center'}>
|
|
|
|
<p className={'font-medium'}>{cron.minute}</p>
|
|
|
|
<p className={'text-2xs text-neutral-500 uppercase'}>Minute</p>
|
2020-10-15 03:13:36 +00:00
|
|
|
</div>
|
2022-06-20 19:28:27 +00:00
|
|
|
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
|
|
|
|
<p className={'font-medium'}>{cron.hour}</p>
|
|
|
|
<p className={'text-2xs text-neutral-500 uppercase'}>Hour</p>
|
2020-10-15 03:13:36 +00:00
|
|
|
</div>
|
2022-06-20 19:28:27 +00:00
|
|
|
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
|
|
|
|
<p className={'font-medium'}>{cron.dayOfMonth}</p>
|
|
|
|
<p className={'text-2xs text-neutral-500 uppercase'}>Day (Month)</p>
|
2020-10-15 03:13:36 +00:00
|
|
|
</div>
|
2022-06-20 19:28:27 +00:00
|
|
|
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
|
|
|
|
<p className={'font-medium'}>{cron.month}</p>
|
|
|
|
<p className={'text-2xs text-neutral-500 uppercase'}>Month</p>
|
2020-10-15 03:13:36 +00:00
|
|
|
</div>
|
2022-06-20 19:28:27 +00:00
|
|
|
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
|
|
|
|
<p className={'font-medium'}>{cron.dayOfWeek}</p>
|
|
|
|
<p className={'text-2xs text-neutral-500 uppercase'}>Day (Week)</p>
|
2020-10-15 03:13:36 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default ScheduleCronRow;
|