Release November 2nd, 2022#1597
Conversation
- update BulkCodeSteps to string values - set up tabConfig and enable/disable conditions - use common CenteredContainer - allow BulkCodesForm to occupy full container width
1. Add translation 2. Add box shadow
add notion link
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Project Name: Planet Webapp Project Link: https://translate.lingohub.com/plant-for-the-planet/dashboard/planet-webapp User: Norbert Schuler Easy language translations with LingoHub 🚀
…age_update_2022-10-26Z Language update from LingoHub 🤖 on 2022-10-26Z
- along with 77126b5 - uses a common InlineFormDisplayGroup where needed - fix alignment in groups not containing only text fields with type prop - update min text field width to 180px
- reason > lighter API call - also update types/interfaces a. rename `APISingleProject` > `MapSingleProject` to reflect API resp. b. use `MapSingleProject` instead of `SingleProject` in DonationLinkForm c. remove unused APISingleProject/SingleProject interfaces d. move `MapSingleProject` to project type file
…ftfund Feature/add giftfund
📝 Changed routes:
Commit d852d6c (https://planet-webapp-gn31vt9er-planetapp.vercel.app). |
…ard-maintenance-refactor Dashboard maintenance refactor
…Route_plantLocation Feature/change route plant location
| import { getAllPlantLocations } from '../src/utils/maps/plantLocations'; | ||
| import i18next from '../i18n'; | ||
| import { SingleProjectGeojson } from '../src/features/common/types/project'; | ||
| import { Treemapper } from '../src/features/user/TreeMapper/Treemapper'; |
There was a problem hiding this comment.
It is not necessary to import a namespace. The namespace Treemapper can be referenced within the application without importing it.
| @@ -1,4 +1,4 @@ | |||
| declare namespace Treemapper { | |||
| export declare namespace Treemapper { | |||
There was a problem hiding this comment.
You do not need to export a namespace. Once declared it is accessible throughout the application.
| @@ -28,11 +29,15 @@ export default function Donate({ | |||
| const [internalCurrencyCode, setInternalCurrencyCode] = React.useState(''); | |||
| const [internalLanguage, setInternalLanguage] = React.useState(''); | |||
| const [open, setOpen] = React.useState(false); | |||
There was a problem hiding this comment.
open is not an unused variable, so we can precede it with _ to remove the TS warning.
| : ''; | ||
|
|
||
| const { selectedPl, hoveredPl } = React.useContext(ProjectPropsContext); | ||
| const { selectedPl, hoveredPl, selectedSite } = |
There was a problem hiding this comment.
We don't seem to be using selectedSite here.
| <Head> | ||
| <title>{t('giftFund')}</title> | ||
| </Head> | ||
| <GiftFunds /> |
There was a problem hiding this comment.
Perhaps this TS warning should be addressed.
Its return type 'false | Element' is not a valid JSX element.
Type 'boolean' is not assignable to type 'ReactElement<any, any>'.```
| {user.planetCash.giftFunds | ||
| .filter((gift) => gift.openUnits !== 0) | ||
| .map((gift, index) => ( | ||
| //Not displaying details for gift fund where open units = 0 | ||
| <div className={styles.container} key={index}> | ||
| <div className={styles.container_heading}> | ||
| <b> | ||
| {user.planetCash?.country}/{user.planetCash?.currency}{' '} | ||
| {t('title')} | ||
| </b> | ||
| </div> | ||
| <hr /> | ||
| <div className={styles.container_details}> | ||
| <div className={styles.project}> | ||
| <b>{t('project')}</b> | ||
| <p>{gift.project}</p> | ||
| </div> | ||
|
|
||
| <div className={styles.unit}> | ||
| <b>{t('units')}</b> | ||
| <p>{Number(gift.openUnits / 100).toFixed(2)}</p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ))} |
There was a problem hiding this comment.
It may make sense to clean this up by separating the render logic into a different function. Also, address the TS errors in this file. - Noted in #1600
| ready && ( | ||
| <DashboardView | ||
| title={t('title')} | ||
| subtitle={ | ||
| <p> | ||
| {t('description1')} | ||
| <br /> | ||
| {t('description2')} | ||
| </p> | ||
| } | ||
| > | ||
| <Details /> | ||
| </DashboardView> | ||
| ) | ||
| ); | ||
| }; |
There was a problem hiding this comment.
It may make sense to refactor this at a later time to use common components like SingleColumnView - Noted in #1600
| hr { | ||
| border: 1px solid #DDDBDA; | ||
| } | ||
| } |
There was a problem hiding this comment.
It may be good to refactor this slightly to use styled css in a similar manner to the other features added to the dashboard recently. (At a later date) - Noted in #1600
> as namespaces do not need to exported/imported
- due to unused state variable `open` - unused context parameter `selectedSite`
- explicitly define return types for functional component `Details` - component was implicitly returning `JSX.Element` or `false` - refactor code to return `ReactElement` | `null`
…e-cleanup-2-nov-22 Release cleanup
![Screenshot of /[p]](https://images.weserv.nl?url=https://sjc.microlink.io/12L1n_4f2c6mKyXBJr9lZABOmbCBIgR_W56RSYDhxIqJEl0qd4XqXJA4E_3_GrKZspxoHjhlIfXukLx3uUZUiA.png&w=600)

Includes:
Features
#1579 Feature/change route plant location
#1592 Feature/add giftfund
Other
#1585 Dashboard maintenace refactor
#1594 add notion link
#1598 Language Update
#1601 Release cleanup