refactor: update EmptyStateLayout to conform to it's new props

pull/126/head
Boaz Poolman 2024-05-08 15:58:30 +02:00
parent dfb5522024
commit ae6402803a
2 changed files with 5 additions and 10 deletions

View File

@ -22,12 +22,9 @@ const FirstExport = () => {
onSubmit={() => dispatch(exportAllConfig([], toggleNotification))} onSubmit={() => dispatch(exportAllConfig([], toggleNotification))}
/> />
<EmptyStateLayout <EmptyStateLayout
content={{ content={formatMessage({ id: 'config-sync.FirstExport.Message' })}
id: 'emptyState',
defaultMessage:
formatMessage({ id: 'config-sync.FirstExport.Message' }),
}}
action={<Button onClick={() => setModalIsOpen(true)}>{formatMessage({ id: 'config-sync.FirstExport.Button' })}</Button>} action={<Button onClick={() => setModalIsOpen(true)}>{formatMessage({ id: 'config-sync.FirstExport.Button' })}</Button>}
icon={<EmptyDocuments width={160} />}
/> />
</div> </div>
); );

View File

@ -1,16 +1,14 @@
import React from 'react'; import React from 'react';
import { EmptyStateLayout } from '@strapi/design-system'; import { EmptyStateLayout } from '@strapi/design-system';
import { useIntl } from 'react-intl'; import { useIntl } from 'react-intl';
import { EmptyDocuments } from '@strapi/icons';
const NoChanges = () => { const NoChanges = () => {
const { formatMessage } = useIntl(); const { formatMessage } = useIntl();
return ( return (
<EmptyStateLayout <EmptyStateLayout
content={{ content={formatMessage({ id: 'config-sync.NoChanges.Message', defaultMessage: 'No differences between DB and sync directory. You are up-to-date!' })}
id: 'emptyState', icon={<EmptyDocuments width={160} />}
defaultMessage:
formatMessage({ id: 'config-sync.NoChanges.Message' }),
}}
/> />
); );
}; };