Skip to content

[Fix]: code smells #3655

@AnthonySteffano

Description

@AnthonySteffano

Related issue

We found code smells issues in the code, some errors are related to DOM, JSX, Large Component, Too many props.

In the first refactoring, we decided to divide it into smaller components, making the code more readable and modular. That's why we split the 'BackgroundLayerChooser' component into smaller subcomponents:

  • 'LayerCard': Represents the view of each individual layer.
  • 'ToggleBackgroundButton': Represents the button for toggling the visibility of layers.
  • 'BackgroundPreview': Represents the preview of the selected layer or background imag
  • 'BackgroundLayerMapComponent': Responsible for rendering the OpenLayers map.
  • 'LayerTitleComponent': Responsible for displaying the layer title.
  • 'LoadingSpinComponent': Responsible for displaying the loading spinner.
  • 'LayerPreviewContainer': Container component that gathers the other components.

Feature request

Code correction and restructuring

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions