Feat(Bio Inventory): Add Bio Inventory Layer - #182
Conversation
186c3b5 to
693d37a
Compare
c5ce527 to
fc3279d
Compare
58a40e0 to
2dabde8
Compare
b403b84 to
8b7236a
Compare
8b7236a to
6d5a04f
Compare
| let chartConfig: ChartConfig = {}; | ||
| chartData.forEach((element) => { | ||
| chartConfig = { | ||
| ...chartConfig, | ||
| [element.name]: { | ||
| label: element.name, | ||
| }, | ||
| }; | ||
| }); |
There was a problem hiding this comment.
Could use reduce here
const chartConfig = chartData.reduce((acc, element) => {
return {
...acc,
[element.name]: { label: element .name }
}
}, { } as ChartConfig);| @@ -1,24 +1,24 @@ | |||
| import type { LabelData } from "@entities/data"; | |||
There was a problem hiding this comment.
Might be good to add to the biome config the entities in the organizeImports below features (I arranged the imports regarding FSD orga)
There was a problem hiding this comment.
"organizeImports": {
"level": "on",
"options": {
"groups": [
[
":PACKAGE:",
":NODE:",
":PACKAGE_WITH_PROTOCOL:",
":BUN:",
"!@app/**",
"!@pages/**",
"!@widgets/**",
"!@features/**",
"!@entities/**",
"!@shared/**",
"!@lib/**",
"!@i18n",
"!@ui/**"
],
":BLANK_LINE:",
[":ALIAS:", "@/**"],
"@app/**",
":BLANK_LINE:",
"@pages/**",
":BLANK_LINE:",
"@widgets/**",
":BLANK_LINE:",
"@features/**",
":BLANK_LINE:",
"@entities/**",
":BLANK_LINE:",
"@shared/**",
"@lib/**",
"@i18n",
":BLANK_LINE:",
"@ui/**",
":BLANK_LINE:",
":PATH:"
]
}
},| @@ -0,0 +1,16 @@ | |||
| import { LAYERS } from "../shared/api/layers"; | |||
There was a problem hiding this comment.
| import { LAYERS } from "../shared/api/layers"; | |
| import { LAYERS } from "@shared/api/layers"; |
| @@ -0,0 +1 @@ | |||
| export { useBioInventoryIndicatorElements as useBiodiversityIndicatorElements } from "./use-bioinventory-indicator-elements"; | |||
There was a problem hiding this comment.
Mmmmh I would rename when importing (on the consumer side), not exporting, it feels a bit weird to not follow its feature naming
There was a problem hiding this comment.
yeah it 's just automatic when renaming a component...
| mapApiRef.current.setLayerSymbol({ | ||
| iconSize: getIconSize({}), | ||
| layerId: LAYERS.INVENTORY_BIO, | ||
| svg: pictoInventaire, |
There was a problem hiding this comment.
Maybe a different picto would be nice ?
There was a problem hiding this comment.
I changed it , should be better now :)
david-bretaud-dev
left a comment
There was a problem hiding this comment.
Great job ! Smallish improvements comments 🚀
4618fb2 to
e7e5607
Compare
No description provided.