From 752a20f32ce8cb552f67ec7e76d1eca0421a503b Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Fri, 15 Nov 2024 10:11:43 +0100 Subject: [PATCH] 1-3124: remove conditionally render, use modal instead --- .../feedbackNew/FeedbackComponent.tsx | 374 ++++++++---------- 1 file changed, 174 insertions(+), 200 deletions(-) diff --git a/frontend/src/component/feedbackNew/FeedbackComponent.tsx b/frontend/src/component/feedbackNew/FeedbackComponent.tsx index 7ac572776167..9c49f2c0bd96 100644 --- a/frontend/src/component/feedbackNew/FeedbackComponent.tsx +++ b/frontend/src/component/feedbackNew/FeedbackComponent.tsx @@ -279,210 +279,184 @@ export const FeedbackComponent = ({ }; return ( - - - closeFeedback()}> - - - + + closeFeedback()}> + + + + + + + + Help us improve Unleash + + + + {feedbackData.title} + + + {[1, 2, 3, 4, 5, 6, 7].map((score) => ( + + + {score} + + ))} + + + + Very difficult + + + Very easy + + + + + {feedbackComments !== false && + feedbackComments.enabled && + feedbackComments.name === 'withoutComments' ? ( + <> + + + + + + ) : ( + <> + + + {feedbackData.positiveLabel} + + + + + + { + feedbackData.areasForImprovementsLabel + } + + + + + )} + + + - - - - - - Help us improve Unleash - - - - - - {feedbackData.title} - - - - {[1, 2, 3, 4, 5, 6, 7].map( - (score) => ( - - - {score} - - ), - )} - - - - Very difficult - - - Very easy - - - - - {feedbackComments !== false && - feedbackComments.enabled && - feedbackComments.name === - 'withoutComments' ? ( - <> - - - - - - ) : ( - <> - - - { - feedbackData.positiveLabel - } - - - - - - { - feedbackData.areasForImprovementsLabel - } - - - - - )} - - + Send Feedback + + - Send Feedback + Don't ask me again - - Don't ask me again - - } - /> - - - - - - - - } - /> + } + /> + + + + + + + ); };