fix: update metatags gen
This commit is contained in:
@@ -1,19 +1,33 @@
|
||||
import { headers } from 'next/headers';
|
||||
import { Contacts } from '@/views';
|
||||
import type { Metadata } from 'next';
|
||||
import { metaInfo } from '@shared/lib';
|
||||
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 <Contacts />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
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 = {
|
||||
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 <Cookie />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
import { ExpertBorodin } 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 <ExpertBorodin />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
import { ExpertGulmamedov } 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 <ExpertGulmamedov />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
import { ExpertYancen } 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 <ExpertYancen />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
import { ExpertKaminskiy } 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 <ExpertKaminskiy />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
import { ExpertKolodiy } 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 <ExpertKolodiy />;
|
||||
|
||||
@@ -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 />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
import { ExpertMityaev } 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 <ExpertMityaev />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
import { Experts } 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 <Experts />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
import { ExpertPolinov } 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 <ExpertPolinov />;
|
||||
|
||||
@@ -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 />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
import { Home } 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 HomePage() {
|
||||
return <Home />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
import { PrivacyPolicy } 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 <PrivacyPolicy />;
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
import { UserAgreement } 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 <UserAgreement />;
|
||||
|
||||
@@ -5,7 +5,8 @@ type TMetaInfo = {
|
||||
description: string;
|
||||
companyName: string;
|
||||
phone: string;
|
||||
url: string;
|
||||
host: string;
|
||||
path: string;
|
||||
ogImageTitle: string;
|
||||
ogImageDescription: string;
|
||||
width?: number;
|
||||
@@ -20,7 +21,8 @@ function metaInfo({ ...props }: TMetaInfo): Metadata {
|
||||
description,
|
||||
companyName,
|
||||
phone,
|
||||
url,
|
||||
host,
|
||||
path = '',
|
||||
ogImageTitle,
|
||||
ogImageDescription,
|
||||
width = 600,
|
||||
@@ -35,11 +37,10 @@ function metaInfo({ ...props }: TMetaInfo): Metadata {
|
||||
openGraph: {
|
||||
title: title,
|
||||
description: description,
|
||||
url: url,
|
||||
url: `${host}${path}`,
|
||||
images: [
|
||||
{
|
||||
url: `${url}/api/og/?title=${ogImageTitle}&description=${ogImageDescription}`,
|
||||
secureUrl: `${url}/api/og/?title=${ogImageTitle}&description=${ogImageDescription}`,
|
||||
url: `${host}/api/og/?title=${ogImageTitle}&description=${ogImageDescription}`,
|
||||
width: width,
|
||||
height: height,
|
||||
alt: `${title} - ${companyName}`,
|
||||
@@ -56,7 +57,7 @@ function metaInfo({ ...props }: TMetaInfo): Metadata {
|
||||
creator: creator,
|
||||
images: [
|
||||
{
|
||||
url: `${url}/api/og/?title=${ogImageTitle}&description=${ogImageDescription}`,
|
||||
url: `${host}/api/og/?title=${ogImageTitle}&description=${ogImageDescription}`,
|
||||
width: width,
|
||||
height: height,
|
||||
alt: `${title} - ${companyName}`,
|
||||
|
||||
8
src/shared/types/metainfo.ts
Normal file
8
src/shared/types/metainfo.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export type TMetainfo = {
|
||||
title: string;
|
||||
description: string;
|
||||
companyName: string;
|
||||
phone: string;
|
||||
ogImageTitle: string;
|
||||
ogImageDescription: string;
|
||||
};
|
||||
Reference in New Issue
Block a user