Why it is showing me path startsWith error. I'm trying to send the amount to the path
import { useRouter } from 'next/navigation'
const checkoutHandler = ()=>{
router.push({
pathname: '/checkout/[amount]',
query: { amount: customAmount},
})
}
<div className="continue-btn" onClick={()=> checkoutHandler()}>
Continue
</div>