// Public-facing homepage const PublicHome = ({ state, navigate }) => { const packages = state.packages.filter(p => p.status === 'published'); const featured = packages.filter(p => p.featured).slice(0, 4); const allTours = packages; const [searchDest, setSearchDest] = useState(''); const [searchService, setSearchService] = useState('All services'); const [searchPrice, setSearchPrice] = useState('Any price'); return (
{/* HERO */}
Kuching-based · Licensed {state.settings.license}

Sarawak,
on your terms.

Inbound tours from the people who actually live here. Outbound trips without the call-centre middleman. Since 2008.

{/* Search bar */}
Destination
setSearchDest(e.target.value)} placeholder="Where to?" style={{ border: 0, outline: 0, fontSize: 15, marginTop: 2, width: '100%', background: 'transparent', color: 'var(--ink)' }} />
Service
Budget
navigate({ route: 'tours' })}>Search
{/* Trust strip */}
{[ { k: '17 yrs', v: 'curating Sarawak' }, { k: '12,400+', v: 'travellers hosted' }, { k: '4.8 ★', v: 'average rating' }, { k: 'Local', v: 'guides, always' }, ].map((s, i) => (
{s.k} {s.v}
))}
{/* SERVICES */}
What we do

Four services, one honest agency.

We don't list everything under the sun. We list the things we've personally vetted — and we answer WhatsApp messages ourselves.
{[ { icon: 'compass', title: 'Tours', text: 'Inbound Sarawak + curated outbound trips.', count: packages.length + ' packages' }, { icon: 'bed-double', title: 'Hotels', text: '4★ and boutique, with direct-booking rates.', count: '60+ partners' }, { icon: 'plane', title: 'Ticketing', text: 'Flight ticketing with on-shore support.', count: '24h response' }, { icon: 'car', title: 'Car Rental', text: 'Self-drive + chauffeured, Kuching-wide.', count: state.vehicles.length + ' vehicles' }, ].map((s, i) => (
e.currentTarget.style.background = '#FBF8F1'} onMouseLeave={e => e.currentTarget.style.background = 'white'} onClick={() => navigate({ route: i === 0 ? 'tours' : i === 3 ? 'vehicles' : 'contact' })}>

{s.title}

{s.text}

{s.count} →
))}
{/* FEATURED TOURS */}
Featured trips

Borneo, actually seen.

{featured.map((p, i) => navigate({ route: 'tour', slug: p.slug })} hero={i === 0} />)}
{/* EDITORIAL BAND */}
★ The PXS promise

No white-label itineraries. No sub-contracted guides.{' '} Just our team, from inquiry to airport drop-off.

{[ ['01', 'You inquire', 'Form or WhatsApp — a human replies in under 4 hours.'], ['02', 'We plan', 'A licensed Kuching-based consultant builds the trip with you.'], ['03', 'You travel', 'One phone number for the whole trip. Answered 24/7.'], ].map(([n, t, d], i) => (
{n}
{t}
{d}
))}
{/* TESTIMONIALS */}
Travellers

What they said when they got home.

{[ { name: 'Clara Bennett', from: 'London, UK', text: 'We used PXS for a two-week Sarawak loop. Peter actually meets you for a coffee when you land — who does that any more?', rating: 5 }, { name: 'Yoshi Nakamura', from: 'Tokyo, Japan', text: 'Impeccable communication in English. Our Mulu trip had a weather hiccup and they rebooked us instantly, at no cost.', rating: 5 }, { name: 'Michael O\'Brien', from: 'Sydney, AU', text: 'We\'ve used them for three family trips now. Kids love Sarah, one of their guides. Book her if you can.', rating: 5 }, ].map((r, i) => (
{[...Array(r.rating)].map((_, j) => )}

"{r.text}"

{r.name}
{r.from}
))}
{/* Partner logos */}
Licensed partner of
{['Sarawak Tourism', 'MATTA', 'ASEANTA', 'MAS Tours', 'AirAsia', 'Ministry of Tourism'].map(x => (
{x}
))}
{/* BLOG TEASER */}
Field notes

From the journal.

{state.blogs.filter(b => b.status === 'published').slice(0, 3).map(b => (
navigate({ route: 'blogpost', slug: b.slug })} style={{ cursor: 'pointer' }} onMouseEnter={e => { const img = e.currentTarget.querySelector('img'); if (img) img.style.transform = 'scale(1.04)'; }} onMouseLeave={e => { const img = e.currentTarget.querySelector('img'); if (img) img.style.transform = 'scale(1)'; }}>
{b.category}

{b.title}

{b.excerpt}

{b.author} · {fmtDate(b.date)}
))}
{/* CTA */}

Ready to go? WhatsApp is fastest.

Most inquiries answered within the hour during business hours.

window.open(`https://wa.me/${state.settings.whatsapp.replace(/[^\d]/g, '')}`, '_blank')}>Chat on WhatsApp navigate({ route: 'contact' })}>Send inquiry
); }; // ---------- Tour card ---------- const TourCard = ({ pkg, onClick, hero = false }) => { const [hover, setHover] = useState(false); return (
setHover(true)} onMouseLeave={() => setHover(false)} style={{ gridColumn: hero ? 'span 2' : 'auto', gridRow: hero ? 'span 2' : 'auto', cursor: 'pointer', background: 'white', borderRadius: 18, overflow: 'hidden', border: '1px solid #e8e1cf', transition: 'all .2s', transform: hover ? 'translateY(-3px)' : 'translateY(0)', boxShadow: hover ? '0 18px 40px rgba(26,31,28,0.12)' : '0 1px 3px rgba(0,0,0,0.03)', }}>
{pkg.category === 'inbound' ? 'Sarawak' : 'Outbound'} {pkg.duration && {pkg.duration}}
{pkg.destination}

{pkg.title}

{hero &&

{pkg.short}

}
From
{fmtMYR(pkg.priceFrom)}/pax
{pkg.rating} ({pkg.reviews})
); }; // ---------- Nav bar ---------- const PublicNav = ({ state, navigate, dark = false }) => { const color = dark ? '#F5EEDE' : 'var(--ink)'; const border = dark ? 'rgba(245,238,222,0.2)' : '#e8e1cf'; const nav = state.nav.filter(n => n.visible); return ( ); }; // ---------- Footer ---------- const PublicFooter = ({ state, navigate }) => ( ); Object.assign(window, { PublicHome, TourCard, PublicNav, PublicFooter });