Files
astuto/app/javascript/components/common/SiteSettingsInfoBox.tsx

28 lines
609 B
TypeScript
Raw Normal View History

2022-05-01 18:00:38 +02:00
import * as React from 'react';
import I18n from 'i18n-js';
2022-05-01 18:00:38 +02:00
import Spinner from './Spinner';
import Box from './Box';
2022-05-01 18:00:38 +02:00
interface Props {
areUpdating: boolean;
error: string;
}
const SiteSettingsInfoBox = ({ areUpdating, error }: Props) => (
<Box customClass="siteSettingsInfo">
2022-05-01 18:00:38 +02:00
{
areUpdating ?
<Spinner />
:
error ?
<span className="error">
{I18n.t('site_settings.info_box.error', { message: JSON.stringify(error) })}
</span>
2022-05-01 18:00:38 +02:00
:
<span>{I18n.t('site_settings.info_box.up_to_date')}</span>
2022-05-01 18:00:38 +02:00
}
</Box>
2022-05-01 18:00:38 +02:00
);
export default SiteSettingsInfoBox;