Files
medreport_mrb2b/lib/root-metdata.ts
Helena 195af1db3d MED-137: add doctor other jobs view (#55)
* add doctor jobs view

* change translation

* another translation change

* clean up

* add analaysis detail view to paths config

* translation

* merge fix

* fix path

* move components to shared

* refactor

* imports

* clean up
2025-08-25 11:12:57 +03:00

40 lines
1009 B
TypeScript

import { Metadata } from 'next';
import { headers } from 'next/headers';
import { appConfig } from '@kit/shared/config';
/**
* @name generateRootMetadata
* @description Generates the root metadata for the application
*/
export const generateRootMetadata = async (): Promise<Metadata> => {
const headersStore = await headers();
const csrfToken = headersStore.get('x-csrf-token') ?? '';
return {
title: appConfig.title,
description: appConfig.description,
metadataBase: new URL(appConfig.url),
applicationName: appConfig.name,
other: {
'csrf-token': csrfToken,
},
openGraph: {
url: appConfig.url,
siteName: appConfig.name,
title: appConfig.title,
description: appConfig.description,
},
twitter: {
card: 'summary_large_image',
title: appConfig.title,
description: appConfig.description,
},
icons: {
icon: '/images/favicon/icon.ico',
apple: '/images/favicon/apple-touch-icon.png',
},
};
};