-
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.
Merge pull request #321 from Vizzuality/SKY30-479-fe-implementation-o…
…f-data-disclaimer-text Add a terrestrial data disclaimer dialog to the Progress tracker
- Loading branch information
Showing
11 changed files
with
145 additions
and
29 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
frontend/src/components/terrestrial-data-disclaimer-dialog.tsx
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,52 @@ | ||
import { useAtom } from 'jotai'; | ||
import { useTranslations } from 'next-intl'; | ||
|
||
import { Button } from '@/components/ui/button'; | ||
import { | ||
Dialog, | ||
DialogContent, | ||
DialogDescription, | ||
DialogFooter, | ||
DialogHeader, | ||
DialogTitle, | ||
} from '@/components/ui/dialog'; | ||
import Icon from '@/components/ui/icon'; | ||
import { terrestrialDataDisclaimerDialogAtom } from '@/containers/map/store'; | ||
import Notification from '@/styles/icons/notification.svg'; | ||
|
||
interface TerrestrialDataDisclaimerDialogProps {} | ||
|
||
const TerrestrialDataDisclaimerDialog = ({}: TerrestrialDataDisclaimerDialogProps) => { | ||
const t = useTranslations('pages.progress-tracker'); | ||
const [, setOpen] = useAtom(terrestrialDataDisclaimerDialogAtom); | ||
|
||
return ( | ||
<Dialog open> | ||
<DialogContent closable={false}> | ||
<DialogHeader className="flex-row gap-2 font-bold text-red"> | ||
<Icon icon={Notification} className="h-6 w-6" /> | ||
{t('important-notification')} | ||
</DialogHeader> | ||
<DialogTitle className="max-w-[350px]"> | ||
{t('terrestrial-data-disclaimer-dialog-title')} | ||
</DialogTitle> | ||
<DialogDescription> | ||
{t.rich('terrestrial-data-disclaimer-dialog-content', { | ||
br: () => <br />, | ||
})} | ||
</DialogDescription> | ||
<DialogFooter> | ||
<Button | ||
type="button" | ||
className="font-mono text-xs font-normal normal-case" | ||
onClick={() => setOpen(false)} | ||
> | ||
{t('i-understand')} | ||
</Button> | ||
</DialogFooter> | ||
</DialogContent> | ||
</Dialog> | ||
); | ||
}; | ||
|
||
export default TerrestrialDataDisclaimerDialog; |
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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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