@@ -10,14 +10,16 @@ import {
1010import { useState } from "react" ;
1111import { PiCaretDownBold } from "react-icons/pi" ;
1212
13+ const links = [
14+ { label : "Docs Directory" , href : "/products/" } ,
15+ {
16+ label : "APIs" ,
17+ href : "https://developers.cloudflare.com/api/" ,
18+ } ,
19+ { label : "SDKs" , href : "/fundamentals/api/reference/sdks/" } ,
20+ ] ;
21+
1322const dropdowns = Object . entries ( {
14- "API & SDKs" : [
15- {
16- label : "API documentation" ,
17- href : "https://developers.cloudflare.com/api/" ,
18- } ,
19- { label : "SDKs" , href : "/fundamentals/api/reference/sdks/" } ,
20- ] ,
2123 Help : [
2224 { label : "Help center" , href : "https://support.cloudflare.com/" } ,
2325 { label : "Cloudflare status" , href : "https://www.cloudflarestatus.com/" } ,
@@ -81,12 +83,15 @@ function Dropdown({ dropdown }: { dropdown: (typeof dropdowns)[number] }) {
8183export default function HeaderDropdownsComponent ( ) {
8284 return (
8385 < div className = "flex gap-2 text-nowrap leading-6" >
84- < a
85- href = "/products/"
86- className = "flex items-center justify-center rounded p-2 font-medium text-black no-underline hover:bg-cl1-white hover:shadow-md dark:hover:bg-cl1-gray-0"
87- >
88- Docs Directory
89- </ a >
86+ { links . map ( ( { label, href } ) => (
87+ < a
88+ key = { href }
89+ href = { href }
90+ className = "flex items-center justify-center rounded p-2 font-medium text-black no-underline hover:bg-cl1-white hover:shadow-md dark:hover:bg-cl1-gray-0"
91+ >
92+ { label }
93+ </ a >
94+ ) ) }
9095 { dropdowns . map ( ( dropdown ) => (
9196 < Dropdown key = { dropdown [ 0 ] } dropdown = { dropdown } />
9297 ) ) }
0 commit comments