26 lines
623 B
React
Raw Normal View History

2024-01-07 21:44:00 +04:00
import PropTypes from 'prop-types';
2023-11-27 18:46:31 +04:00
import { useNavigate } from 'react-router-dom';
2024-01-07 21:44:00 +04:00
function Button100({ line }) {
2023-11-27 18:46:31 +04:00
const navigator = useNavigate();
const RedirectVideo = () => {
2024-01-07 21:44:00 +04:00
navigator(`/Watch/${line.id}`);
2023-11-27 18:46:31 +04:00
};
return (
<>
<button onClick={RedirectVideo} className="vid" style={{ width: '100%' }}>
2024-01-07 21:44:00 +04:00
<img src={line.image} style={{ maxWidth: '100%', maxHeight: '50%' }} />
<h1 className="text-center">{line.title}</h1>
2023-11-27 18:46:31 +04:00
</button>
</>
);
}
2024-01-07 21:44:00 +04:00
Button100.propTypes = {
line: PropTypes.object,
};
2023-11-27 18:46:31 +04:00
export default Button100;