stacker.news/components/cancel-button.js

10 lines
315 B
JavaScript
Raw Normal View History

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