Skip to content

Commit

Permalink
fix(satisfaction): renomer les evenements envoyés tel qu'ils étaient …
Browse files Browse the repository at this point in the history
…avant (#6426)
  • Loading branch information
carolineBda authored Jan 21, 2025
1 parent 58b67a2 commit 968a5aa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const FeedbackContent = (props: Props) => {
label: "Les informations ne sont pas claires",
nativeInputProps: {
name: "unclear",
value: "unclear" as FeedbackActionChoiceValue,
value: FeedbackActionChoiceValue.unclear,
onChange: onChangeCategories,
ref: setFirstCheckboxRef,
},
Expand All @@ -109,23 +109,23 @@ export const FeedbackContent = (props: Props) => {
"Cette page ne correspond pas à ma recherche ou à ma situation.",
nativeInputProps: {
name: "unrelated",
value: "unrelated" as FeedbackActionChoiceValue,
value: FeedbackActionChoiceValue.unrelated,
onChange: onChangeCategories,
},
},
{
label: "Je ne suis pas satisfait de cette réglementation.",
nativeInputProps: {
name: "unsatisfied",
value: "unsatisfied" as FeedbackActionChoiceValue,
value: FeedbackActionChoiceValue.unsatisfied,
onChange: onChangeCategories,
},
},
{
label: "Les informations me semblent fausses.",
nativeInputProps: {
name: "wrong",
value: "wrong" as FeedbackActionChoiceValue,
value: FeedbackActionChoiceValue.wrong,
onChange: onChangeCategories,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exports[`<FeedbackContent /> should match snapshot for negative 1`] = `
id="fr-fieldset-checkbox-:r2:-0"
name="unclear"
type="checkbox"
value="unclear"
value="Les informations ne sont pas claires."
/>
<label
class="fr-label"
Expand All @@ -44,7 +44,7 @@ exports[`<FeedbackContent /> should match snapshot for negative 1`] = `
id="fr-fieldset-checkbox-:r2:-1"
name="unrelated"
type="checkbox"
value="unrelated"
value="Cette page ne correspond pas à ma recherche ou à ma situation."
/>
<label
class="fr-label"
Expand All @@ -60,7 +60,7 @@ exports[`<FeedbackContent /> should match snapshot for negative 1`] = `
id="fr-fieldset-checkbox-:r2:-2"
name="unsatisfied"
type="checkbox"
value="unsatisfied"
value="Je ne suis pas satisfait de cette réglementation."
/>
<label
class="fr-label"
Expand All @@ -76,7 +76,7 @@ exports[`<FeedbackContent /> should match snapshot for negative 1`] = `
id="fr-fieldset-checkbox-:r2:-3"
name="wrong"
type="checkbox"
value="wrong"
value="Les informations me semblent fausses."
/>
<label
class="fr-label"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ enum FeedbackActionEvent {
NEGATIVE = "negative",
}

export type FeedbackActionChoiceValue =
| "unclear"
| "unrelated"
| "unsatisfied"
| "wrong";
export enum FeedbackActionChoiceValue {
"unclear" = "Les informations ne sont pas claires.",
"unrelated" = "Cette page ne correspond pas à ma recherche ou à ma situation.",
"unsatisfied" = "Je ne suis pas satisfait de cette réglementation.",
"wrong" = "Les informations me semblent fausses.",
}

export const useFeedbackEvents = () => {
const baseUrl = usePathname();
Expand Down

0 comments on commit 968a5aa

Please sign in to comment.