stacker.news/components/cancel-button.js

10 lines
315 B
JavaScript
Raw Normal View History

2023-06-12 19:34:10 +00:00
import { useRouter } from 'next/router'
2023-07-24 18:35:05 +00:00
import Button from 'react-bootstrap/Button'
2023-06-12 19:34:10 +00:00
export default function CancelButton ({ onClick }) {
const router = useRouter()
return (
<Button className='me-4 text-muted nav-link fw-bold' variant='link' onClick={onClick || (() => router.back())}>cancel</Button>
2023-06-12 19:34:10 +00:00
)
}