mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-21 11:49:32 -05:00
adds close button on response error screen
This commit is contained in:
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user