Advertisement
Dnar

Untitled

Jul 18th, 2019
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react'
  2.  
  3. import { connect } from 'react-redux'
  4.  
  5. import { action as startStream } from 'src/redux/events/startStream'
  6. import { action as stopStream } from 'src/redux/events/stopStream'
  7.  
  8. import Button from 'src/components/@WaspMozg/lib/Button'
  9.  
  10. import css from './index.module.sass'
  11.  
  12. const StartStream = ({ dispatch, active, id }) => (
  13.   <div className={css['button']}>
  14.     {!active && <Button onClick={() => dispatch(startStream({ id }))}>
  15.       Начать вещание
  16.     </Button>}
  17.     {active && <Button onClick={() => dispatch(stopStream({ id }))} theme={'grey'}>
  18.       Остановить вещание
  19.     </Button>}
  20.   </div>
  21. )
  22.  
  23. export default connect()(StartStream)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement