From ec822c28149ca37bc3228c55b65151cb174dd477 Mon Sep 17 00:00:00 2001 From: Truls Henrik Date: Tue, 22 Oct 2024 11:41:28 +0200 Subject: [PATCH 1/7] chore: informative subtitle for studio --- studio/studioConfig.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/studio/studioConfig.tsx b/studio/studioConfig.tsx index 864d58438..03554f2e1 100644 --- a/studio/studioConfig.tsx +++ b/studio/studioConfig.tsx @@ -19,7 +19,7 @@ const SUPPORTED_LANGUAGES_QUERY = `*[_type == "languageSettings" && !(_id in pat const config: WorkspaceOptions = { name: "studio", title: "Studio", - subtitle: "Our Own Space", + subtitle: "Variant Norge", icon: () => , basePath: "/studio", projectId, From a04d58cc8bfa7c9d685ae85b6f73f6ffaf1bdff9 Mon Sep 17 00:00:00 2001 From: Truls Henrik Date: Tue, 22 Oct 2024 11:41:46 +0200 Subject: [PATCH 2/7] chore: images could be null + backup key --- src/components/customerCases/customerCase/CustomerCase.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/customerCases/customerCase/CustomerCase.tsx b/src/components/customerCases/customerCase/CustomerCase.tsx index 85b5a759d..e01b0b6e6 100644 --- a/src/components/customerCases/customerCase/CustomerCase.tsx +++ b/src/components/customerCases/customerCase/CustomerCase.tsx @@ -69,9 +69,9 @@ export default function CustomerCase({ customerCase }: CustomerCaseProps) { ) : (
- {section.images.map((image) => ( + {section.images?.map((image) => (
From 195ba11cf65de6a4bd465b9e8d231c6a2fc70edb Mon Sep 17 00:00:00 2001 From: Truls Henrik Date: Tue, 22 Oct 2024 13:02:19 +0200 Subject: [PATCH 3/7] chore: improve Text typing --- src/components/text/Text.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/text/Text.tsx b/src/components/text/Text.tsx index ce8902217..5669ef457 100644 --- a/src/components/text/Text.tsx +++ b/src/components/text/Text.tsx @@ -11,7 +11,7 @@ export type TextType = | "small" | "caption"; -const elementMap: { [key in TextType]: string } = { +const elementMap: { [key in TextType]: keyof JSX.IntrinsicElements } = { display: "h1", h1: "h1", h2: "h2", @@ -46,8 +46,8 @@ const Text = ({ id?: string; className?: string; }) => { - const Element = elementMap[type] as keyof JSX.IntrinsicElements; - const generatedClassName = `${classMap[type]} ${className ? className : ""}`; + const Element = elementMap[type]; + const generatedClassName = `${classMap[type]} ${className ?? ""}`; return ( From a12684bc018b49847687d7534f8deceed9357d8d Mon Sep 17 00:00:00 2001 From: Truls Henrik Date: Tue, 22 Oct 2024 13:02:28 +0200 Subject: [PATCH 4/7] chore: do not use index as key --- src/components/richText/RichText.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/richText/RichText.tsx b/src/components/richText/RichText.tsx index 1ae76fdbf..64da765bd 100644 --- a/src/components/richText/RichText.tsx +++ b/src/components/richText/RichText.tsx @@ -144,7 +144,10 @@ const GroupedBlogText = ({ value }: GroupedBlogTextProps) => { // Render h2 titles, h3 subtitles, and paragraphs within a div wrapper for other groups return ( -
+
{group.title && ( Date: Tue, 22 Oct 2024 13:03:31 +0200 Subject: [PATCH 5/7] chore: use 'nullish coalescing' instead of 'logical or' --- src/components/customerCases/customerCase/CustomerCase.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/customerCases/customerCase/CustomerCase.tsx b/src/components/customerCases/customerCase/CustomerCase.tsx index e01b0b6e6..ee5441290 100644 --- a/src/components/customerCases/customerCase/CustomerCase.tsx +++ b/src/components/customerCases/customerCase/CustomerCase.tsx @@ -71,7 +71,7 @@ export default function CustomerCase({ customerCase }: CustomerCaseProps) {
{section.images?.map((image) => (
From 26b68d4c2727966b488e88433745217fa8a0f4e7 Mon Sep 17 00:00:00 2001 From: Truls Henrik Date: Tue, 22 Oct 2024 13:46:37 +0200 Subject: [PATCH 6/7] fix: h7 is not a valid tag --- src/components/text/text.module.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/text/text.module.css b/src/components/text/text.module.css index 0f56e2db5..118c21ba4 100644 --- a/src/components/text/text.module.css +++ b/src/components/text/text.module.css @@ -5,7 +5,6 @@ .h4, .h5, .h6, -.h7, .bodyXl { color: var(--primary-black); font-family: var(--font-britti-sans); @@ -61,7 +60,7 @@ } } -/* TODO: we need to add sizes og h4-h7 */ +/* TODO: we need to add sizes og h4-h6 */ .desktopLink { font-size: 10rem; From 527c0e87edd45290823fb307fcf651c592d80213 Mon Sep 17 00:00:00 2001 From: Truls Henrik Date: Tue, 22 Oct 2024 13:49:38 +0200 Subject: [PATCH 7/7] remember to save your files :) --- src/components/text/Text.stories.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/components/text/Text.stories.tsx b/src/components/text/Text.stories.tsx index d77b7ccdd..7bf7dfc14 100644 --- a/src/components/text/Text.stories.tsx +++ b/src/components/text/Text.stories.tsx @@ -17,7 +17,6 @@ const meta: Meta = { "h4", "h5", "h6", - "h7", "labelSmall", "labelLight", "labelRegular", @@ -94,13 +93,6 @@ export const H6: Story = { }, }; -export const H7: Story = { - args: { - type: "h7", - children: "This is an H7 text", - }, -}; - export const LabelSmall: Story = { args: { type: "labelSmall",