import React, { useState } from 'react'
import { Head, router } from '@inertiajs/react'
import CustomerLayout from '@/Layouts/CustomerLayout'
export default function Index({
auth: { user },
poins: { data, next_page_url },
}) {
const [_poins, setpoins] = useState(data)
const handleNextPage = () => {
router.get(
next_page_url,
{},
{
replace: true,
preserveState: true,
only: ['poins'],
onSuccess: (res) => {
setpoins(_poins.concat(res.props.poins.data))
},
}
)
}
return (