Skip to content
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

fix: ui #383

Merged
merged 19 commits into from
Jun 26, 2024
Merged

fix: ui #383

merged 19 commits into from
Jun 26, 2024

Conversation

lheneman-pass
Copy link
Collaborator

Description

Cette pull request ne fait que des mises à jour css, theme... concernant l'UI.

Tickets

Lien 1

Lien 2

Lien 3

Lien 4

Lien 5

Lien 6

Lien 7

Copy link
Contributor

@pierrecanthelou pierrecanthelou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Juste un petit refacto que je vois :)


return _filtres?.map((filtre) => {
let uniqueValue: string[] = []
switch (filtre.filtre) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Salut, penses-tu pouvoir ne faire qu'une seule fois cette fonction uniqueValue... ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je propose

const toto = {
"Secteur d'activités" : {T:'api::event.event', case:'secteur'},
"Catégories" : {T:'api::event.event', case:'secteur'},
...
}
   uniqueValues = uniqueValue(
          _data as APIResponseData<toto[filtre.filtre].T>[],
          (item) => item.attributes[toto[filtre.filtre].case]
        )

| APIResponseData<'api::news.news'>[]

export const filterByAttribute = (filtres: Filtre, data: Data) => {
const _filtres = filtres
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ne faut-il pas un deepcopy ici ?

Copy link

sonarcloud bot commented Jun 26, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
3.9% Duplication on New Code (required ≤ 0%)

See analysis details on SonarCloud

@pierrecanthelou pierrecanthelou merged commit c6871ba into main Jun 26, 2024
7 of 8 checks passed
@pierrecanthelou pierrecanthelou deleted the fix-ui branch June 26, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants