import React, { useState } from 'react'
import { Head, router } from '@inertiajs/react'
import CustomerLayout from '@/Layouts/CustomerLayout'
import { HiChevronLeft } from 'react-icons/hi2'
import { BsWhatsapp } from 'react-icons/bs'
import { GrMap } from 'react-icons/gr'
export default function Index({ locations: { data, next_page_url } }) {
const [locations, setLocations] = useState(data)
const handleNextPage = () => {
router.get(
next_page_url,
{},
{
replace: true,
preserveState: true,
only: ['locations'],
onSuccess: (res) => {
setLocations(locations.concat(res.props.locations.data))
},
}
)
}
return (