79471828

Date: 2025-02-27 07:03:47
Score: 1
Natty:
Report link

You could do something like this:

import {router} from '@inertiajs/vue3'

const paginateClick = (page) => {
    const currentUrl = window.location.pathname;

    const query = new URLSearchParams(window.location.search);

    query.set('page', page);

    router.get(`${currentUrl}?${query.toString()}`)
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Hoang