2023-06-02 06:05:14 +07:00
|
|
|
import { resolveToRoot } from "../path"
|
|
|
|
|
|
|
|
export interface HeaderProps {
|
|
|
|
title: string
|
|
|
|
slug: string
|
|
|
|
}
|
|
|
|
|
2023-06-04 02:07:19 +07:00
|
|
|
export function Component({ title, slug }: HeaderProps) {
|
2023-06-02 06:05:14 +07:00
|
|
|
const baseDir = resolveToRoot(slug)
|
|
|
|
return <header>
|
|
|
|
<h1><a href={baseDir}>{title}</a></h1>
|
|
|
|
</header>
|
|
|
|
}
|
2023-06-04 02:07:19 +07:00
|
|
|
|