import React from "react" import { Link, useLocation } from "react-router-dom" type Tab = { label: string to: string } const BASE = "/settings/paypal" const TABS: Tab[] = [ { label: "PayPal Connection", to: `${BASE}/connection` }, { label: "PayPal Settings", to: `${BASE}/paypal-settings` }, { label: "Advanced Card Payments", to: `${BASE}/advanced-card-payments` }, { label: "Additional Settings", to: `${BASE}/additional-settings` }, ] function isActive(pathname: string, to: string) { return pathname === to || pathname.startsWith(to + "/") } /** Tab bar shared by every Settings → PayPal page. */ export default function PayPalTabs() { const { pathname } = useLocation() return (