Skip to content

Commit

Permalink
fix(site): remove extra spacing on template variables page
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoQuaresma authored Jul 17, 2023
1 parent 56889d6 commit 0bf1b01
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,23 @@ export const TemplateVariablesPageView: FC<TemplateVariablesPageViewProps> = ({
!errors.getTemplateDataError &&
!errors.updateTemplateError
const { t } = useTranslation("templateVariablesPage")

const hasError = Object.values(errors).some((error) => Boolean(error))
return (
<>
<PageHeader className={classes.pageHeader}>
<PageHeaderTitle>{t("title")}</PageHeaderTitle>
</PageHeader>
<div className={classes.errorContainer}>
{Boolean(errors.getTemplateDataError) && (
<ErrorAlert error={errors.getTemplateDataError} />
)}
{Boolean(errors.updateTemplateError) && (
<ErrorAlert error={errors.updateTemplateError} />
)}
{Boolean(errors.jobError) && <ErrorAlert error={errors.jobError} />}
</div>
{hasError && (
<div className={classes.errorContainer}>
{Boolean(errors.getTemplateDataError) && (
<ErrorAlert error={errors.getTemplateDataError} />
)}
{Boolean(errors.updateTemplateError) && (
<ErrorAlert error={errors.updateTemplateError} />
)}
{Boolean(errors.jobError) && <ErrorAlert error={errors.jobError} />}
</div>
)}
{isLoading && <Loader />}
{templateVersion && templateVariables && templateVariables.length > 0 && (
<TemplateVariablesForm
Expand Down

0 comments on commit 0bf1b01

Please sign in to comment.