fix: update metatags gen
This commit is contained in:
@@ -1,19 +1,33 @@
|
||||
import { ExpertVolkovaGoncharova } 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 <ExpertVolkovaGoncharova />;
|
||||
|
||||
Reference in New Issue
Block a user