Greenstand / treetracker-web-map-client

The front end of the treetracker web map app.
http://map.treetracker.org
GNU Affero General Public License v3.0
64 stars 181 forks source link

Add tree growth timeline component to capture page #1764

Open dadiorchen opened 7 months ago

dadiorchen commented 7 months ago

On the capture page, like this one http://localhost:3000/v2/captures/0c2d6e3a-d02a-4edf-bcdc-893e1f7a4817?bounds=-122.51961708068849,38.35888785866677,-122.50416755676271,38.37096777260178

Image

we need to add a new tree growth component under the picture of the capture, with all the captures matched to the same tree.

Image

Can reuse the component we used in this page:

Image

https://map.treetracker.org/wallets/9e143717-b34b-4e53-b810-6668d371adda/tokens/fbeefadc-edb2-41ce-9f44-2c1ac6aed2d0?bounds=36.48280620574952,-0.2044053510145395,36.4982557296753,-0.18899883327178638

To fetch the data, we need to use the /v2/trees/{tree_id}/captures endpoint:

https://github.com/Greenstand/treetracker-query-api/blob/8e838839cc07c4dbfc761f7345d3540b2cd294fc/docs/api/spec/query-api.yaml#L255-L272

Please use the integration test by Cypress to mock the data and pass the test for this feature.

khalatevarun commented 7 months ago

@dadiorchen i request to share the mock data of the captures api since the api is current returning 404

ha0min commented 3 months ago

Hi @dadiorchen, please guide me how to mock the caputres page data so that I could add the component to the page. The current component designed is in PR #1787.