adds close button on response error screen

This commit is contained in:
pandeymangg
2026-05-21 13:26:13 +05:30
parent f7890eaec3
commit c425e7aff4
@@ -1049,20 +1049,39 @@ export function Survey({
switch (errorType) {
case TResponseErrorCodesEnum.ResponseSendingError:
return (
<ResponseErrorComponent
responseData={responseQueue?.getUnsentData() ?? responseData}
questions={questions}
onRetry={retryResponse}
isRetrying={isRetrying}
/>
<>
{localSurvey.type !== "link" ? (
<div className="bg-survey-bg relative h-8 w-full">
<div className="flex w-full items-center justify-end">
<SurveyCloseButton
onClose={onClose}
hoverColor={styling.inputBgColor?.light ?? "#f8fafc"}
borderRadius={styling.roundness ?? 8}
/>
</div>
</div>
) : null}
<ResponseErrorComponent
responseData={responseQueue?.getUnsentData() ?? responseData}
questions={questions}
onRetry={retryResponse}
isRetrying={isRetrying}
/>
</>
);
case TResponseErrorCodesEnum.RecaptchaError:
case TResponseErrorCodesEnum.InvalidDeviceError:
return (
<>
{localSurvey.type !== "link" ? (
<div className="bg-survey-bg flex h-6 justify-end pt-2 pr-2">
<SurveyCloseButton onClose={onClose} />
<div className="bg-survey-bg relative h-8 w-full">
<div className="flex w-full items-center justify-end">
<SurveyCloseButton
onClose={onClose}
hoverColor={styling.inputBgColor?.light ?? "#f8fafc"}
borderRadius={styling.roundness ?? 8}
/>
</div>
</div>
) : null}
<ErrorComponent errorType={errorType} />