webapp/src/components/Topic/FloorHeader.tsx
2023-11-28 16:18:25 +03:00

22 lines
558 B
TypeScript

import type { Topic } from '../../graphql/schema/core.gen'
import { useLocalize } from '../../context/localize'
import { Icon } from '../_shared/Icon'
import './FloorHeader.scss'
export default (props: { topic: Topic; color: string }) => {
const { t } = useLocalize()
return (
<>
<h3 class="col-sm-12">{props.topic.title}</h3>
<div class="col-sm-12 all-materials">
<a href={`/topic/${props.topic.slug}`}>
{t('All posts')}
<Icon name={`arrow-right-${props.color}`} />
</a>
</div>
</>
)
}