YouHaveNoChannels.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import React from 'react';
  2. import { Link } from 'react-router-dom';
  3. import { Message } from 'semantic-ui-react';
  4. type Props = {
  5. suspended?: boolean;
  6. };
  7. export function YouHaveNoChannels (props: Props) {
  8. const { suspended = false } = props;
  9. const renderSuspendedAlert = () => (
  10. <Message
  11. compact
  12. error
  13. icon='warning sign'
  14. header='Channel Creation Suspended'
  15. content='Please try again later'
  16. className='JoyInlineMsg'
  17. />
  18. );
  19. const renderCreateButton = () => (
  20. <Link to={'/media/channels/new'}>
  21. <Message
  22. compact
  23. success
  24. icon='plus circle'
  25. header='Create Channel'
  26. content='and start publishing'
  27. className='JoyInlineMsg CreateBtn'
  28. />
  29. </Link>
  30. );
  31. return <>
  32. <h2 style={{ marginTop: '2rem', marginBottom: '.5rem' }}>
  33. Build your following on Joystream
  34. </h2>
  35. <p style={{ marginBottom: '2rem' }}>
  36. A channel is a way to organize related content for the benefit
  37. of both the publisher and the audience.
  38. </p>
  39. {suspended
  40. ? renderSuspendedAlert()
  41. : renderCreateButton()
  42. }
  43. </>;
  44. }