diff --git a/apps/infoalloggi/src/pages/annuncio/[cod].tsx b/apps/infoalloggi/src/pages/annuncio/[cod].tsx index 92946c5..53c545a 100644 --- a/apps/infoalloggi/src/pages/annuncio/[cod].tsx +++ b/apps/infoalloggi/src/pages/annuncio/[cod].tsx @@ -69,13 +69,6 @@ const AnnuncioDettaglio: NextPage = ({ const session = useSession(); const { locale } = useTranslation(); - const [url, setUrl] = useState(""); - useEffect(() => { - if (typeof window !== "undefined") { - setUrl(window.location.href); - } - }, []); - const { data, isLoading } = api.annunci.getAnnuncio.useQuery( { cod: cod, @@ -112,12 +105,11 @@ const AnnuncioDettaglio: NextPage = ({ - {/* */} @@ -125,10 +117,6 @@ const AnnuncioDettaglio: NextPage = ({ property="og:logo" content={`${env.NEXT_PUBLIC_BASE_URL}/Infoalloggi.png`} /> - - {typeof window !== "undefined" && ( - - )}
diff --git a/apps/infoalloggi/src/pages/api/og.tsx b/apps/infoalloggi/src/pages/api/og.tsx deleted file mode 100644 index c54cc9f..0000000 --- a/apps/infoalloggi/src/pages/api/og.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { ImageResponse } from "@vercel/og"; -import type { NextRequest } from "next/server"; - -export const config = { - runtime: "edge", -}; - -export default async function handler(request: NextRequest) { - const { searchParams } = request.nextUrl; - - const og = searchParams.get("og"); - if (!og) { - return new Response("Missing 'cod' parameter", { status: 400 }); - } - - return new ImageResponse( - ( -
- {/* eslint-disable-next-line @next/next/no-img-element, jsx-a11y/alt-text */} - -
- ), - { - width: 1200, - height: 630, - }, - ); -}