fix: update metatags gen

This commit is contained in:
2025-12-11 15:12:20 +03:00
parent 765b65a00a
commit 3aa39d96ca
18 changed files with 319 additions and 82 deletions

View File

@@ -1,19 +1,33 @@
import { ExpertMikova } 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 = {
const metainfo: TMetainfo = {
title: 'Эксперт - Микова Инна Георгиевна',
description:
'Услуги независимой оценки и судебной экспертизы в Сочи и Краснодаре.',
companyName: 'Компания ДИТРАСО',
phone: '+7 (900) 241-34-34',
url: 'https://ocenka-sochi.ru',
ogImageTitle: 'Оценка и экспертиза',
ogImageDescription: 'Независимая оценка и судебная экспертиза',
};
export const metadata: Metadata = metaInfo(metainfo);
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 <ExpertMikova />;