import { router } from '@inertiajs/react' import qs from 'qs' const PageLink = ({ active, label, url, params }) => { const className = `mr-1 mb-1 px-4 py-3 border border-solid border-gray-300 rounded text-sm bg-white hover:bg-white ${ active && 'focus:outline-none focus:border-indigo-700 focus:text-indigo-700 border-indigo-600 bg-indigo-600 text-white hover:bg-indigo-400' }` const onClick = () => { router.get( `${url}&${qs.stringify(params)}`, {}, { replace: true, preserveState: true, } ) } return (