From a6916b8b82f96c93803ee3370d95b955ce453341 Mon Sep 17 00:00:00 2001 From: mannipje <135017126+mannipje@users.noreply.github.com> Date: Mon, 7 Oct 2024 18:00:04 +0000 Subject: [PATCH] fix(web): Change custom syslumenn pages config for header (#16299) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- apps/web/screens/Organization/Syslumenn/Auctions.tsx | 10 ++++++++-- apps/web/screens/Organization/Syslumenn/Homestay.tsx | 10 ++++++++-- .../Organization/Syslumenn/OperatingLicenses.tsx | 10 ++++++++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/apps/web/screens/Organization/Syslumenn/Auctions.tsx b/apps/web/screens/Organization/Syslumenn/Auctions.tsx index 31a013dd41cf..3806485f30fe 100644 --- a/apps/web/screens/Organization/Syslumenn/Auctions.tsx +++ b/apps/web/screens/Organization/Syslumenn/Auctions.tsx @@ -1100,17 +1100,23 @@ Auctions.getProps = async ({ apolloClient, locale, req, res }) => { ), ]) + const usingDefaultHeader: boolean = namespace['usingDefaultHeader'] ?? false + return { organizationPage: getOrganizationPage, subpage: getOrganizationSubpage, syslumennAuctions: getSyslumennAuctions, namespace, showSearchInHeader: false, + themeConfig: !usingDefaultHeader + ? { + headerButtonColorScheme: 'negative', + headerColorScheme: 'white', + } + : {}, } } export default withMainLayout(Auctions, { - headerButtonColorScheme: 'negative', - headerColorScheme: 'white', footerVersion: 'organization', }) diff --git a/apps/web/screens/Organization/Syslumenn/Homestay.tsx b/apps/web/screens/Organization/Syslumenn/Homestay.tsx index ff72e3e59cd4..822c0d613e63 100644 --- a/apps/web/screens/Organization/Syslumenn/Homestay.tsx +++ b/apps/web/screens/Organization/Syslumenn/Homestay.tsx @@ -372,17 +372,23 @@ Homestay.getProps = async ({ apolloClient, locale, req }) => { throw new CustomNextError(404, 'Organization subpage not found') } + const usingDefaultHeader: boolean = namespace['usingDefaultHeader'] ?? false + return { organizationPage: getOrganizationPage, subpage: getOrganizationSubpage, homestays: getHomestays, namespace, showSearchInHeader: false, + themeConfig: !usingDefaultHeader + ? { + headerButtonColorScheme: 'negative', + headerColorScheme: 'white', + } + : {}, } } export default withMainLayout(Homestay, { - headerButtonColorScheme: 'negative', - headerColorScheme: 'white', footerVersion: 'organization', }) diff --git a/apps/web/screens/Organization/Syslumenn/OperatingLicenses.tsx b/apps/web/screens/Organization/Syslumenn/OperatingLicenses.tsx index 013cf107936f..e862ea1b7a21 100644 --- a/apps/web/screens/Organization/Syslumenn/OperatingLicenses.tsx +++ b/apps/web/screens/Organization/Syslumenn/OperatingLicenses.tsx @@ -668,16 +668,22 @@ OperatingLicenses.getProps = async ({ apolloClient, locale, req }) => { throw new CustomNextError(404, 'Organization subpage not found') } + const usingDefaultHeader: boolean = namespace['usingDefaultHeader'] ?? false + return { organizationPage: getOrganizationPage, subpage: getOrganizationSubpage, namespace, showSearchInHeader: false, + themeConfig: !usingDefaultHeader + ? { + headerButtonColorScheme: 'negative', + headerColorScheme: 'white', + } + : {}, } } export default withMainLayout(OperatingLicenses, { - headerButtonColorScheme: 'negative', - headerColorScheme: 'white', footerVersion: 'organization', })