import React from 'react'; import { Schedule } from '@/api/server/schedules/getServerSchedules'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faCalendarAlt } from '@fortawesome/free-solid-svg-icons'; import { format } from 'date-fns'; import tw from 'twin.macro'; import ScheduleCronRow from '@/components/server/schedules/ScheduleCronRow'; export default ({ schedule }: { schedule: Schedule }) => ( <>
{schedule.name}
Last run at: {schedule.lastRunAt ? format(schedule.lastRunAt, 'MMM do \'at\' h:mma') : 'never'}
{schedule.isActive ? 'Active' : 'Inactive'}
{schedule.isProcessing ? 'Processing' : schedule.isActive ? 'Active' : 'Inactive' }