Files
ocenka-web/src/app/cookies/page.tsx
2025-12-11 15:50:13 +03:00

34 lines
1.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 { Cookie } from '@/views';
import type { Metadata } from 'next';
import { metaInfo } from '@shared/lib';
import { headers } from 'next/headers';
import { TMetainfo } from '@shared/types/metainfo';
const metainfo: TMetainfo = {
title: 'Соглашение об использовании систем аналитики',
description:
'Услуги оценки имущества и проведение судебных экспертиз Тел.: +7 (900) 241-34-34. Предварительный анализ - бесплатно!',
companyName: 'Компания ДИТРАСО',
phone: '+7 (900) 241-34-34',
ogImageUrl: '/images/opengraph/main.png',
};
export async function generateMetadata(): Promise<Metadata> {
const h = await headers();
const referer = h.get('referer') ?? '';
const host = h.get('host') ?? '';
const proto = h.get('x-forwarded-proto') ?? '';
const path = referer ? new URL(referer).pathname : '';
const metainfoExtended = Object.assign({}, metainfo, {
host: `${proto}://${host}`,
path: path,
});
return metaInfo(metainfoExtended);
}
export default function Page() {
return <Cookie />;
}