webapp/src/components/Topic/FloorHeader.tsx

20 lines
548 B
TypeScript
Raw Normal View History

2022-09-09 11:53:35 +00:00
import type { Topic } from '../../graphql/types.gen'
2022-11-14 17:41:05 +00:00
import { Icon } from '../_shared/Icon'
2022-09-09 11:53:35 +00:00
import './FloorHeader.scss'
2023-02-17 09:21:02 +00:00
import { useLocalize } from '../../context/localize'
2022-09-09 11:53:35 +00:00
export default (props: { topic: Topic; color: string }) => {
2023-02-17 09:21:02 +00:00
const { t } = useLocalize()
2022-09-09 11:53:35 +00:00
return (
<>
<h3 class="col-sm-6">{props.topic.title}</h3>
<div class="col-sm-6 all-materials">
<a href={`/topic/${props.topic.slug}`}>
{t('All posts')}
<Icon name={`arrow-right-${props.color}`} />
</a>
</div>
</>
)
}