From 426e771b52bd783b092200d8e1922edac5a2c6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81rmann=20P=C3=A9tur=20=C3=86varsson?= Date: Mon, 7 Oct 2024 14:36:57 +0000 Subject: [PATCH] Change custom syslumenn config for header --- 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', })