fifty-shades-of-bully/src/pages/components/customButton.jsx

12 lines
303 B
React
Raw Normal View History

2024-12-10 02:37:04 +07:00
import '../../css/customButton.css'
import { useNavigate } from 'react-router-dom';
2024-12-10 02:37:04 +07:00
function BlackButton({ text , to="/"}) {
const navigate = useNavigate();
2024-12-10 02:37:04 +07:00
return(
<button className='gray' onClick={()=> navigate(to, { replace: true })}>{text}</button>
)
}
2024-12-10 02:37:04 +07:00
export default BlackButton