import { ExternalLink, Spinner } from '@wordpress/components' import { __ } from '@wordpress/i18n' import classNames from 'classnames' import { Checkmark } from '@onboarding/svg' import { useTasks } from '@assist/hooks/useTasks' import { useTasksStoreReady, useTasksStore } from '@assist/state/Tasks' export const TasksList = () => { const { tasks, loading, error } = useTasks() const ready = useTasksStoreReady() if (loading || !ready || error) { return (
) } if (tasks.length === 0) { return (
{__('No tasks found...', 'extendify')}
) } return (

{__('Get ready to go live', 'extendify')}

{tasks.length}
{tasks.map((task) => ( ))}
) } const TaskCheckBox = ({ task }) => { const { isCompleted, toggleCompleted } = useTasksStore() return (
toggleCompleted(task.slug)} /> {task.description}{' '} {task.link && ( {__('Learn more', 'extendify')} )}
) }