(is_on, off, on, onClick, disabled)
| 28 | }; |
| 29 | |
| 30 | const SwitchButton = (is_on, off, on, onClick, disabled) => { |
| 31 | return is_on ? ( |
| 32 | <Button red bold onClick={onClick} disabled={disabled}> |
| 33 | {off} |
| 34 | </Button> |
| 35 | ) : ( |
| 36 | <Button onClick={onClick} disabled={disabled}> |
| 37 | {on} |
| 38 | </Button> |
| 39 | ); |
| 40 | }; |
| 41 | |
| 42 | export const AppHeader = () => { |
| 43 | const dispatch = useDispatch(); |