-
Notifications
You must be signed in to change notification settings - Fork 963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(web): link data portal from app #7703
base: master
Are you sure you want to change the base?
feat(web): link data portal from app #7703
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need the fix the button in other languages before it can be merged.
function getCountryToDownload(zoneId?: string) { | ||
if (!zoneId) { | ||
return ''; | ||
} | ||
|
||
const zoneName = getZoneName(zoneId); | ||
const zoneCountryName = | ||
zoneId && zoneId.includes('-') && getCountryName(zoneId)?.toLowerCase(); | ||
return zoneCountryName || zoneName; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This don't really work as it gets the translated name of the country. So it breaks for everything except English.
<Button | ||
href={url} | ||
icon={<Download size={DEFAULT_ICON_SIZE} />} | ||
type="tertiary" | ||
size="md" | ||
aria-label="Download CSV Data" | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we mark that this is an external link just like we do in the header the desktop view?
); | ||
} | ||
|
||
export default DownloadCsv; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's Memo it just in case.
Issue
We don't have enough visibility of the data portal in the app
Description
This PR adds download button to the zone header which links to the appropriate page of the data portal
Preview
TODO
Only show button when zone has data in the data portal
Finalize design and button placement