Fix file organization and naming

[MAILPOET-4404]
This commit is contained in:
Jan Jakes
2022-06-28 14:46:41 +02:00
committed by Jan Jakeš
parent 14c0e1dc4d
commit 3e9d9b0d4e
11 changed files with 13 additions and 11 deletions

View File

@ -1,7 +1,7 @@
import ReactDOM from 'react-dom';
import { Workflow } from './list/workflow';
import { AutomationListing } from './list/automation-listing';
import { Onboarding } from './onboarding/onboarding';
import { Workflow } from './listing/workflow';
import { AutomationListing } from './listing';
import { Onboarding } from './onboarding';
import { Loading } from '../common';
import {
CreateTestingWorkflowButton,

View File

@ -0,0 +1,5 @@
export * from './Edit';
export * from './More';
export * from './Name';
export * from './Status';
export * from './Subscribers';

View File

@ -1,11 +1,7 @@
import { Workflow } from './workflow';
import { Subscribers } from './cells/Subscribers';
import { Status } from './cells/Status';
import { Name } from './cells/Name';
import { Edit } from './cells/Edit';
import { More } from './cells/More';
import { Edit, More, Name, Status, Subscribers } from './cells';
export function Row(workflow: Workflow): object[] {
export function getRow(workflow: Workflow): object[] {
return [
{
value: workflow.name,

View File

@ -1,17 +1,18 @@
import { Search, TableCard } from '@woocommerce/components';
import { __ } from '@wordpress/i18n';
import { Row } from './row';
import { getRow } from './get-row';
import { Workflow } from './workflow';
interface AutomationListingProps {
workflows: Workflow[];
loading: boolean;
}
export function AutomationListing({
workflows,
loading,
}: AutomationListingProps): JSX.Element {
const rows = workflows.map((workflow) => Row(workflow));
const rows = workflows.map((workflow) => getRow(workflow));
const headers = [
{ key: 'name', label: __('Name', 'mailpoet') },