stacker.news/components/cancel-button.js

10 lines
321 B
JavaScript
Raw Normal View History

2023-06-12 19:34:10 +00:00
import { useRouter } from 'next/router'
import { Button } from 'react-bootstrap'
export default function CancelButton ({ onClick }) {
const router = useRouter()
return (
<Button className='mr-3 text-muted nav-link font-weight-bold' variant='link' onClick={onClick || (() => router.back())}>cancel</Button>
)
}