Files
sorsfonalak/services/frontend/src/components/ReportLink.tsx
T

21 lines
447 B
TypeScript
Raw Normal View History

"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
/** "Hiba jelzése": the feedback page, with this page as where it happened. */
export function ReportLink({
children = "Hiba jelzése",
}: {
children?: React.ReactNode;
}) {
const pathname = usePathname();
return (
<Link
href={`/visszajelzes?tipus=bug&honnan=${encodeURIComponent(pathname)}`}
>
{children}
</Link>
);
}