temp
This commit is contained in:
@@ -6,7 +6,7 @@ export default function Footer() {
|
||||
<footer className="flex flex-col w-full px-4 lg:px-16 py-8 gap-8 bg-muted">
|
||||
<div className="flex flex-col lg:flex-row lg:items-center gap-4">
|
||||
<Image
|
||||
src="/emblem.png"
|
||||
src="/emblems/europe.png"
|
||||
width={28}
|
||||
height={28}
|
||||
alt="Emblem of the European Federation"
|
||||
|
||||
@@ -19,7 +19,7 @@ export default async function Header() {
|
||||
return (
|
||||
<header className="relative flex items-center justify-between w-full h-16 px-4 sm:px-8 bg-white sm:bg-gray-100">
|
||||
<Link href="/" className="flex items-center gap-4 shrink-0">
|
||||
<Image src="/emblem.png" width={28} height={28} alt="Emblem of the European Federation" />
|
||||
<Image src="/emblems/europe.png" width={28} height={28} alt="Emblem of the European Federation" />
|
||||
<h3 className="hidden sm:block">European Federation</h3>
|
||||
</Link>
|
||||
<div className="hidden md:flex absolute left-1/2 -translate-x-1/2 items-center gap-6">
|
||||
|
||||
@@ -75,7 +75,7 @@ export default function IdentityCard({ data }: { data: IdentityCardData }) {
|
||||
<div className="relative z-10">
|
||||
<div className="flex flex-row items-center justify-between">
|
||||
<div className="flex flex-row gap-3 items-center">
|
||||
<Image src="/emblem.png" width={24} height={24} alt="Emblem" />
|
||||
<Image src="/emblems/europe.png" width={24} height={24} alt="Emblem" />
|
||||
<h2>ID Card</h2>
|
||||
</div>
|
||||
<h3>{data.documentNumber}</h3>
|
||||
|
||||
@@ -21,7 +21,7 @@ export function MobileNav({ links, isAuthenticated }: { links: NavLink[]; isAuth
|
||||
<div className="fixed inset-0 z-50 bg-white flex flex-col">
|
||||
<div className="flex items-center justify-between h-16 px-4">
|
||||
<Link href="/" onClick={() => setOpen(false)} className="flex items-center gap-4 shrink-0">
|
||||
<Image src="/emblem.png" width={28} height={28} alt="Emblem of the European Federation" />
|
||||
<Image src="/emblems/europe.png" width={28} height={28} alt="Emblem of the European Federation" />
|
||||
<h3 className="hidden sm:block">European Federation</h3>
|
||||
</Link>
|
||||
<Button variant="ghost" size="icon" onClick={() => setOpen(false)} aria-label="Close menu">
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
"use client"
|
||||
|
||||
import { SearchIcon } from "lucide-react";
|
||||
import { InputGroup, InputGroupAddon, InputGroupInput } from "@/components/ui/input-group";
|
||||
import { Field } from "@/components/ui/field";
|
||||
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
||||
import { useState, useTransition } from "react";
|
||||
|
||||
export default function SearchBar() {
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const searchParams = useSearchParams();
|
||||
const [value, setValue] = useState(searchParams.get("q") ?? "");
|
||||
const [, startTransition] = useTransition();
|
||||
|
||||
function handleChange(next: string) {
|
||||
setValue(next);
|
||||
|
||||
const params = new URLSearchParams(searchParams.toString());
|
||||
if (next) {
|
||||
params.set("q", next);
|
||||
} else {
|
||||
params.delete("q");
|
||||
}
|
||||
|
||||
startTransition(() => {
|
||||
router.replace(`${pathname}?${params.toString()}`, { scroll: false });
|
||||
});
|
||||
}
|
||||
|
||||
return (
|
||||
<Field className="max-w-sm">
|
||||
<InputGroup>
|
||||
<InputGroupInput
|
||||
placeholder="Search..."
|
||||
value={value}
|
||||
onChange={(e) => handleChange(e.target.value)}
|
||||
/>
|
||||
<InputGroupAddon align="inline-start">
|
||||
<SearchIcon className="text-muted-foreground" />
|
||||
</InputGroupAddon>
|
||||
</InputGroup>
|
||||
</Field>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user