mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 06:57:12 +01:00
apply new-link codemod
This commit is contained in:
@@ -27,8 +27,8 @@ export default function BookingTable({
|
||||
{
|
||||
name: 'Email',
|
||||
value: (
|
||||
<Link href={`mailto:${booking.email}`}>
|
||||
<a className="link">{booking.email}</a>
|
||||
<Link href={`mailto:${booking.email}`} className="link">
|
||||
{booking.email}
|
||||
</Link>
|
||||
),
|
||||
},
|
||||
@@ -42,8 +42,8 @@ export default function BookingTable({
|
||||
>
|
||||
<div className="px-4 py-5 sm:px-6">
|
||||
<h3 className="text-lg leading-6 font-medium text-gray-900">
|
||||
<Link href={`/admin/bookings/${booking.uuid}`}>
|
||||
<a className="link">Booking {booking.uuid}</a>
|
||||
<Link href={`/admin/bookings/${booking.uuid}`} className="link">
|
||||
Booking{booking.uuid}
|
||||
</Link>
|
||||
</h3>
|
||||
<p className="mt-1 max-w-2xl text-sm text-gray-500">
|
||||
@@ -71,5 +71,5 @@ export default function BookingTable({
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,25 +7,25 @@ export default function Footer() {
|
||||
<footer>
|
||||
<div className="flex flex-col sm:flex-row max-w-7xl mx-auto px-4 sm:px-6 my-5">
|
||||
<div className="flex-grow">
|
||||
<Link href="/">
|
||||
<a className="underline">
|
||||
<Logo className="h-12 w-auto sm:h-14" />
|
||||
</a>
|
||||
<Link href="/" className="underline">
|
||||
|
||||
<Logo className="h-12 w-auto sm:h-14" />
|
||||
|
||||
</Link>
|
||||
</div>
|
||||
<ul className="flex flex-col gap-2 sm:flex-row sm:items-end ">
|
||||
<li>
|
||||
<Link href="/privacy">
|
||||
<a className="underline">Datenschutzerklärung</a>
|
||||
<Link href="/privacy" className="underline">
|
||||
Datenschutzerklärung
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/impressum">
|
||||
<a className="underline">Impressum</a>
|
||||
<Link href="/impressum" className="underline">
|
||||
Impressum
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -33,81 +33,81 @@ export default function Header() {
|
||||
router.push(event.currentTarget.href)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Pfadi-Bussle</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
<div className="">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6">
|
||||
<div className="relative flex justify-between items-center border-b-2 border-gray-100 py-6 md:justify-start md:space-x-10">
|
||||
<div className="flex justify-start lg:w-0 flex-1">
|
||||
<Link href="/">
|
||||
<a className="text-lg tracking-tight font-extrabold text-blue-800 sm:text-xl md:text-2xl">
|
||||
Pfadi-Bussle
|
||||
return <>
|
||||
<Head>
|
||||
<title>Pfadi-Bussle</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
<div className="">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6">
|
||||
<div className="relative flex justify-between items-center border-b-2 border-gray-100 py-6 md:justify-start md:space-x-10">
|
||||
<div className="flex justify-start lg:w-0 flex-1">
|
||||
<Link
|
||||
href="/"
|
||||
className="text-lg tracking-tight font-extrabold text-blue-800 sm:text-xl md:text-2xl">
|
||||
|
||||
Pfadi-Bussle
|
||||
|
||||
</Link>
|
||||
</div>
|
||||
<nav className="hidden space-x-10 sm:flex">
|
||||
{NAV_ENTRIES.map(({ label, href }) => {
|
||||
return (
|
||||
<a
|
||||
key={href}
|
||||
href={href}
|
||||
onClick={changeRoute}
|
||||
className="text-base font-medium text-gray-500 hover:text-gray-900"
|
||||
>
|
||||
{label}
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
<nav className="hidden space-x-10 sm:flex">
|
||||
{NAV_ENTRIES.map(({ label, href }) => {
|
||||
return (
|
||||
<a
|
||||
key={href}
|
||||
href={href}
|
||||
onClick={changeRoute}
|
||||
className="text-base font-medium text-gray-500 hover:text-gray-900"
|
||||
>
|
||||
{label}
|
||||
</a>
|
||||
)
|
||||
})}
|
||||
</nav>
|
||||
<nav
|
||||
onClick={() => setHamburgerOpen(!hamburgerOpen)}
|
||||
className="flex flex-col sm:hidden text-gray-500 hover:text-gray-900 cursor-pointer"
|
||||
)
|
||||
})}
|
||||
</nav>
|
||||
<nav
|
||||
onClick={() => setHamburgerOpen(!hamburgerOpen)}
|
||||
className="flex flex-col sm:hidden text-gray-500 hover:text-gray-900 cursor-pointer"
|
||||
>
|
||||
<svg
|
||||
className="w-5"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<svg
|
||||
className="w-5"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M4 6h16M4 12h16M4 18h16"
|
||||
/>
|
||||
</svg>
|
||||
<div
|
||||
className={`${
|
||||
hamburgerOpen || 'hidden'
|
||||
} absolute z-10 mt-5 transform right-0`}
|
||||
>
|
||||
<div className="rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 overflow-hidden">
|
||||
<div className="relative grid gap-2 bg-white px-4 py-2">
|
||||
{NAV_ENTRIES.map(({ label, href }) => {
|
||||
return (
|
||||
<a
|
||||
key={href}
|
||||
href={href}
|
||||
onClick={changeRoute}
|
||||
className="text-base font-medium text-gray-500 hover:text-gray-900"
|
||||
>
|
||||
{label}
|
||||
</a>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M4 6h16M4 12h16M4 18h16"
|
||||
/>
|
||||
</svg>
|
||||
<div
|
||||
className={`${
|
||||
hamburgerOpen || 'hidden'
|
||||
} absolute z-10 mt-5 transform right-0`}
|
||||
>
|
||||
<div className="rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 overflow-hidden">
|
||||
<div className="relative grid gap-2 bg-white px-4 py-2">
|
||||
{NAV_ENTRIES.map(({ label, href }) => {
|
||||
return (
|
||||
<a
|
||||
key={href}
|
||||
href={href}
|
||||
onClick={changeRoute}
|
||||
className="text-base font-medium text-gray-500 hover:text-gray-900"
|
||||
>
|
||||
{label}
|
||||
</a>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<User />
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<User />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
</div>
|
||||
</>;
|
||||
}
|
||||
|
||||
@@ -37,15 +37,17 @@ export default function Navigation() {
|
||||
<span className="font-extrabold">{pathLabel}</span>
|
||||
</h2>
|
||||
{status === 'authenticated' && data.user.email && (
|
||||
<Link href="/admin">
|
||||
<a className="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">
|
||||
<Link
|
||||
href="/admin"
|
||||
className="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">
|
||||
|
||||
Buchungen
|
||||
</a>
|
||||
|
||||
</Link>
|
||||
)}
|
||||
<div className="flex-grow" />
|
||||
<User />
|
||||
</>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user