Files
website/app/page.tsx
T
WilliamSoderberg Verified 32b3d87fb5
Publish Docker image / Build and Push Docker image (release) Successful in 34s
force-dynamic
2026-10-13 11:04:45 +02:00

68 lines
2.0 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.
// app/page.tsx
import { Metadata } from 'next';
import BeachPromo from './components/BeachPromo';
import Footer from './components/Footer';
import Header from './components/Header';
import HomeClientContent from './components/HomeClientContent';
import { getConfig } from './lib/config';
export const dynamic = 'force-dynamic';
export async function generateMetadata(): Promise<Metadata> {
const config = await getConfig();
const beachSuffix = config.showBeachPromo ? ' Just nu: Anmälan öppen till Höganäs Beach Open!' : '';
return {
title: 'LVS – Volleyboll för alla i Höganäs',
description: `Välkommen till Lerbergets Volleybollsällskap. Vi erbjuder kidsvolley och inomhusvolleyboll för alla åldrar i Höganäs.${beachSuffix}`,
openGraph: {
title: 'LVS | Lerbergets Volleybollsällskap',
description: 'Häng med och spela volleyboll med oss i Höganäs!',
url: 'https://lerbergetsvolleyboll.se',
siteName: 'Lerbergets Volleybollsällskap',
locale: 'sv_SE',
type: 'website',
},
};
}
export default async function Home() {
const config = await getConfig();
const jsonLd = {
'@context': 'https://schema.org',
'@type': 'SportsOrganization',
'name': 'Lerbergets Volleybollsällskap',
'alternateName': 'LVS',
'url': 'https://lerbergetsvolleyboll.se',
'logo': 'https://lerbergetsvolleyboll.se/images/favicon.svg',
'address': {
'@type': 'PostalAddress',
'streetAddress': 'Friluftsvägen 14',
'addressLocality': 'Höganäs',
'postalCode': '263 54',
'addressCountry': 'SE',
},
'sameAs': [
'https://www.instagram.com/lerbergets_volleyboll/',
'https://www.facebook.com/lerbergetsvolleyboll',
'https://www.laget.se/LVS'
]
};
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
<main>
<Header />
{config.showBeachPromo && <BeachPromo />}
<HomeClientContent />
<Footer />
</main>
</>
);
}