File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
app/(main)/resources/[category] Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 33import { Button } from "@/app/conf/_design-system/button"
44import { Eyebrow } from "@/_design-system/eyebrow"
55import { BlogCard } from "@/components/blog-page/blog-card"
6-
7- import { sectionId } from "./texts"
6+ import { sectionIds } from "./texts"
87
98export interface BlogPost {
109 href : string
@@ -31,7 +30,7 @@ export function BlogPostsSection({
3130} : BlogPostsSectionProps ) {
3231 return (
3332 < section
34- id = { sectionId ( "Blog posts" ) }
33+ id = { sectionIds [ "blog-or-newsletter" ] }
3534 className = "gql-container gql-section flex flex-col gap-10 lg:gap-16"
3635 >
3736 < header className = "flex flex-col gap-6 lg:flex-row lg:items-end lg:justify-between" >
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { Button } from "@/app/conf/_design-system/button"
44
55import { ResourceHubCard } from "../resource-hub-card"
66
7- import { texts , sectionKindNames , sectionId } from "./texts"
7+ import { texts , sectionKindNames , sectionIds } from "./texts"
88
99function sectionLabel ( kind : Kind ) {
1010 return sectionKindNames [ kind ] ?? `${ kind [ 0 ] . toUpperCase ( ) } ${ kind . slice ( 1 ) } `
@@ -20,11 +20,10 @@ export function CardsSection({
2020 const sectionData = texts [ category ] . sections [ section . kind ]
2121 const heading = sectionData ?. heading ?? sectionLabel ( section . kind )
2222 const text = sectionData ?. text
23- const label = sectionLabel ( section . kind )
2423
2524 return (
2625 < section
27- id = { sectionId ( label ) }
26+ id = { sectionIds [ section . kind ] }
2827 className = "gql-container gql-section flex flex-col gap-6"
2928 >
3029 < header className = "flex items-center justify-between gap-4" >
Original file line number Diff line number Diff line change 11import { clsx } from "clsx"
22
33import { ChevronRight } from "@/app/conf/_design-system/pixelarticons/chevron-right"
4+ import { slugify } from "@/app/(main)/resources/[category]/texts"
45
56export interface TocHeroContentsProps
67 extends React . HTMLAttributes < HTMLDivElement > {
@@ -34,7 +35,7 @@ export function TocHeroContents({
3435 typeof section === "string"
3536 ? {
3637 name : section ,
37- href : `#${ section . toLowerCase ( ) . replace ( / / g , "-" ) } ` ,
38+ href : `#${ slugify ( section ) } ` ,
3839 }
3940 : section
4041
You can’t perform that action at this time.
0 commit comments