mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-27 16:58:46 +00:00
22 lines
598 B
TypeScript
22 lines
598 B
TypeScript
import config from '../../config.json'
|
|
import { Footer, ToolCard } from '../components'
|
|
import { useLocale, useTitle } from '../contexts'
|
|
import { cleanUrl } from '../Utils'
|
|
|
|
interface Props {
|
|
category: string,
|
|
path?: string,
|
|
}
|
|
export function Category({ category }: Props) {
|
|
const { locale } = useLocale()
|
|
useTitle(locale('title.generator_category', locale(category)))
|
|
return <main>
|
|
<div class="category">
|
|
{config.generators.filter(g => g.category === category).map(g =>
|
|
<ToolCard title={locale(g.id)} link={cleanUrl(g.url)} />
|
|
)}
|
|
</div>
|
|
<Footer donate={false} />
|
|
</main>
|
|
}
|