{#each subsectionTitles?.slice(0, 4) as title} {@const sectionKey = title ?.toLowerCase() ?.replace(/&/g, "") // Remove & symbol ?.replace(/\s+/g, "-") // Replace spaces with dash ?.replace(/-{2,}/g, "-") // Replace multiple dashes with single dash ?.replace(/^-|-$/g, "") // Remove leading/trailing dashes ?.trim()}
  • changeSubSection(sectionKey)} class="px-2 text-sm sm:text-[1rem] whitespace-nowrap font-medium text-gray-400 sm:hover:text-white {displaySubSection === sectionKey ? 'text-white' : 'bg-[#09090B]'}" > {title}
  • {/each}