ChannelNameAsLink.tsx 481 B

12345678910111213141516171819
  1. import React from 'react';
  2. import { Link } from 'react-router-dom';
  3. import { ChannelEntity } from '../entities/ChannelEntity';
  4. type Props = {
  5. channel: ChannelEntity;
  6. className?: string;
  7. style?: React.CSSProperties;
  8. }
  9. export const ChannelNameAsLink = (props: Props) => {
  10. const { channel, className, style } = props;
  11. return (
  12. <Link to={`/media/channels/${channel.id}`} className={className} style={style}>
  13. {channel.title || channel.handle}
  14. </Link>
  15. );
  16. };