Files
ocenka-web/src/app/ocenka/page.tsx
2025-12-11 16:40:16 +03:00

34 lines
1.1 KiB
TypeScript

import { OcenkaCategory } from '@/views';
import type { Metadata } from 'next';
import { headers } from 'next/headers';
import { metaInfo } from '@shared/lib';
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 OcenkaPage() {
return <OcenkaCategory />;
}