Jacky Zhao
2023-06-01 04eeb2d10c2bb8cac595a879446c1dcbfac4d6a6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { resolveToRoot } from "../path"
 
export interface HeaderProps {
  title: string
  slug: string
}
 
export default function({ title, slug }: HeaderProps) {
  const baseDir = resolveToRoot(slug)
  return <header>
    <h1><a href={baseDir}>{title}</a></h1>
  </header>
 
}