Files
sorsfonalak/services/frontend/src/app/page.tsx
T
fecoandClaude Opus 5.5 b88a88b225
CI / test (push) Successful in 1m24s
CI / build (push) Successful in 4m45s
CI / deploy (push) Skipped
Home page: the analyses are written by the most advanced AI models
The hero says it under the lead ('egy tapasztalt asztrológushoz közelítő
mélység, töredék áron'), a new 'Miért más?' band explains it in three
points (the models, an astrologer's depth, a fraction of the price, at
once), and the description and link preview text mention it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
2026-11-19 12:08:08 +00:00

49 lines
2.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { Metadata } from "next";
import { redirect } from "next/navigation";
import { BACKEND_URL, getMe } from "@/lib/server";
import { siteUrl } from "@/lib/share";
import type { PublicConfig } from "@/lib/types";
import { Landing } from "./Landing";
/** Bumped when the preview image changes, so Facebook and co. fetch it again. */
const PREVIEW_VERSION = 1;
export async function generateMetadata(): Promise<Metadata> {
const base = await siteUrl();
const title = "Sorsfonalak – ahol a csillagok összekötnek";
const description =
"Születési képlet, részletes elemzés, éves előrejelzés és kapcsolati összevetés a legfejlettebb AI-modellekkel, töredék áron.";
const image = {
url: `${base}/kep/fooldal.png?v=${PREVIEW_VERSION}`,
width: 1200,
height: 630,
alt: "Egy példa születési képlet a Sorsfonalakon",
};
return {
title: { absolute: "Sorsfonalak – születési képlet, éves előrejelzés, kapcsolati összevetés" },
description:
"Percre pontos születési képlet és személyre szóló elemzés a legfejlettebb AI-modellekkel: egy tapasztalt asztrológushoz közelítő mélység, töredék áron. Éves előrejelzés és kapcsolati összevetés.",
alternates: { canonical: `${base}/` },
openGraph: { type: "website", siteName: "Sorsfonalak", locale: "hu_HU", url: `${base}/`, title, description, images: [image] },
twitter: { card: "summary_large_image", title, description, images: [image.url] },
};
}
async function signupMode(): Promise<PublicConfig["signup_mode"]> {
try {
const res = await fetch(`${BACKEND_URL}/v1/config`, { next: { revalidate: 300 } });
return res.ok ? ((await res.json()) as PublicConfig).signup_mode : "invite";
} catch {
return "invite";
}
}
/** Visitors get the home page; logged-in users go to their chart (or to the profile for their birth data). */
export default async function Home() {
const me = await getMe();
if (me) redirect(me.primary_chart_id ? "/keplet" : "/profil");
return <Landing inviteOnly={(await signupMode()) !== "open"} />;
}