|
|
|
@ -8,20 +8,30 @@ interface SectionsData { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
interface SectionsProps { |
|
|
|
|
/* Whether to display the "Sections" title and separator that appears on the left. */ |
|
|
|
|
showHeader?: boolean; |
|
|
|
|
data: SectionsData[]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export default function Sections({ data }: SectionsProps) { |
|
|
|
|
export function Sections({ data, showHeader = true }: SectionsProps) { |
|
|
|
|
return ( |
|
|
|
|
<section className={styles.sections}> |
|
|
|
|
<h1>Sections</h1> |
|
|
|
|
<div className={styles.separator} /> |
|
|
|
|
{showHeader ? ( |
|
|
|
|
<> |
|
|
|
|
<h1>Sections</h1> |
|
|
|
|
<div className={styles.separator} /> |
|
|
|
|
</> |
|
|
|
|
) : ( |
|
|
|
|
"" |
|
|
|
|
)} |
|
|
|
|
<nav className={styles.nav}> |
|
|
|
|
{data.map((datum, index) => { |
|
|
|
|
return ( |
|
|
|
|
<div key={`${datum.name}-${index}`} className={styles.navItem}> |
|
|
|
|
<h4>{String(index).padStart(2, "0")}</h4> |
|
|
|
|
<a href={datum.url}>{datum.name}</a> |
|
|
|
|
<a href={datum.url}> |
|
|
|
|
<h4>{String(index).padStart(2, "0")} </h4> |
|
|
|
|
<p>{datum.name}</p> |
|
|
|
|
</a> |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
})} |
|
|
|
|