Files
automatisch/packages/web/src/components/TrialOverAlert/index.ee.jsx
2024-03-15 16:56:31 +03:00

32 lines
886 B
JavaScript

import * as React from 'react';
import Alert from '@mui/material/Alert';
import Typography from '@mui/material/Typography';
import * as URLS from 'config/urls';
import { generateInternalLink } from 'helpers/translationValues';
import useUserTrial from 'hooks/useUserTrial.ee';
import useFormatMessage from 'hooks/useFormatMessage';
export default function TrialOverAlert() {
const formatMessage = useFormatMessage();
const trialStatus = useUserTrial();
if (!trialStatus || !trialStatus.over) return <React.Fragment />;
return (
<Alert
severity="error"
sx={{
display: 'flex',
alignItems: 'center',
}}
>
<Typography variant="subtitle2" sx={{ lineHeight: 1.5 }}>
{formatMessage('trialOverAlert.text', {
link: generateInternalLink(URLS.SETTINGS_PLAN_UPGRADE),
})}
</Typography>
</Alert>
);
}