mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-26 13:26:22 +00:00
15 lines
276 B
TypeScript
15 lines
276 B
TypeScript
|
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>
|
||
|
|
||
|
}
|