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