From 5ba7ccb92b89ca5c550cb8be04facf815a66e660 Mon Sep 17 00:00:00 2001 From: Ida Marie Andreassen <43541032+idamand@users.noreply.github.com> Date: Thu, 12 Dec 2024 09:18:29 +0100 Subject: [PATCH] V3 add title to customer entry (#1004) * Add title to customer case entry block * Add styling to title * Add translations to deliveries * Remove console log from the past --- .../contactInformation/ContactSelector.tsx | 1 - .../customerCasesEntry/CustomerCasesEntry.tsx | 11 +++++++++- .../customerCasesEntry/CustomerCasesList.tsx | 8 +++---- .../customerCasesEntry.module.css | 13 +++++++++++ src/utils/renderSection.tsx | 4 ++-- studio/lib/queries/pages.ts | 3 +++ .../objects/sections/customerCasesEntry.ts | 22 ++++++++++++++++++- 7 files changed, 53 insertions(+), 9 deletions(-) diff --git a/src/components/customerCases/customerCase/contactInformation/ContactSelector.tsx b/src/components/customerCases/customerCase/contactInformation/ContactSelector.tsx index 9ff75782a..507db68d1 100644 --- a/src/components/customerCases/customerCase/contactInformation/ContactSelector.tsx +++ b/src/components/customerCases/customerCase/contactInformation/ContactSelector.tsx @@ -39,7 +39,6 @@ export default function ContactSelector({ } const selectedOrDefaultLocationId = selectedLocationId ?? locationIds[0]; - console.log(selectedLocationId); return ( <> diff --git a/src/components/sections/customerCasesEntry/CustomerCasesEntry.tsx b/src/components/sections/customerCasesEntry/CustomerCasesEntry.tsx index c1fec4869..0a7e99a2d 100644 --- a/src/components/sections/customerCasesEntry/CustomerCasesEntry.tsx +++ b/src/components/sections/customerCasesEntry/CustomerCasesEntry.tsx @@ -1,21 +1,25 @@ import { headers } from "next/headers"; +import Text from "src/components/text/Text"; import { Locale } from "src/i18n/routing"; import { getDraftModeInfo } from "src/utils/draftmode"; import { domainFromHostname } from "src/utils/url"; +import { CustomerCasesEntrySection } from "studio/lib/interfaces/pages"; import { CUSTOMER_CASES_PAGE_SITEMAP_QUERY } from "studio/lib/queries/specialPages"; import { loadStudioQuery } from "studio/lib/store"; import { CustomerCaseEntry } from "studioShared/lib/interfaces/customerCases"; import { CUSTOMER_CASE_ENTRY_QUERY } from "studioShared/lib/queries/customerCases"; import { loadSharedQuery } from "studioShared/lib/store"; +import styles from "./customerCasesEntry.module.css"; import CustomerCasesList from "./CustomerCasesList"; interface CustomerCasesProps { language: Locale; + section: CustomerCasesEntrySection; } -async function CustomerCasesEntry({ language }: CustomerCasesProps) { +async function CustomerCasesEntry({ language, section }: CustomerCasesProps) { const { perspective } = getDraftModeInfo(); const domain = domainFromHostname(headers().get("host")); @@ -42,6 +46,11 @@ async function CustomerCasesEntry({ language }: CustomerCasesProps) { return ( customerCaseResult && (