-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Added error for missing growth variables
- Loading branch information
1 parent
007d927
commit c9ad75b
Showing
3 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React, { useState } from 'react'; | ||
import i18n from '@dhis2/d2-i18n'; | ||
import { WidgetCollapsible } from '../../components/WidgetCollapsible'; | ||
import { Warning } from '../Icons'; | ||
|
||
export const MissingGrowthVariablesError = () => { | ||
const [open, setOpen] = useState(true); | ||
return ( | ||
<div style={{ | ||
width: '100vw', | ||
margin: 0, | ||
padding: 0, | ||
}} | ||
> | ||
<WidgetCollapsible | ||
header={i18n.t('Growth Chart')} | ||
borderless={false} | ||
open={open} | ||
onOpen={() => setOpen(true)} | ||
onClose={() => setOpen(false)} | ||
> | ||
<div className='flex justify-center'> | ||
<Warning className='w-12 h-12' /> | ||
<p className='flex p-5 pt-2'> | ||
{i18n.t('No growth variables were found.')} | ||
<br /> | ||
{i18n.t('Please add growth variables and try again.')} | ||
</p> | ||
</div> | ||
</WidgetCollapsible> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters