import React from 'react' import { Head, router, usePage } from '@inertiajs/react' import CustomerLayout from '@/Layouts/CustomerLayout' import { HiOutlineBell } from 'react-icons/hi2' import UserBanner from './UserBanner' const GuestBanner = () => { const { props: { app_name }, } = usePage() return (
{/* user */}
Welcome to {app_name}
0
) } export default function Index({ auth: { user }, infos, banners, locations }) { const handleBanner = (banner) => { router.get(route('home.banner', banner)) } return (
{user !== null ? : } {/* banner */}
{banners.map((banner) => ( handleBanner(banner)} key={banner.id} src={banner.image_url} className={`rounded w-${ banners.length === 1 ? 'full' : '[80%]' } min-w-[340px] h-28 object-cover`} /> ))}
{/* info */}
{infos.map((info) => (
{info.title}
))}
{/* voucher */}
{/* chips */}
{locations.map((location) => (
{location.name}
))}
{/* voucher */}
{[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((x) => (
Lawaranet voucher internet sedap
Jabriel.net
IDR 10.000
50%
20.000
8GB
3 Hari
))}
) }