21 lines
447 B
TypeScript
21 lines
447 B
TypeScript
"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>
|
||
|
|
);
|
||
|
|
}
|