Обновлены страницы с мета-тегами: заменены статические мета-теги на компонент MetaTags, который динамически получает данные через getMetaByPath. Добавлены новые страницы с мета-тегами, включая карточку товара, страницы оплаты и профиля, а также обновлены существующие страницы для улучшения SEO.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import Head from "next/head";
|
||||
import MetaTags from "../../components/MetaTags";
|
||||
import { getMetaByPath } from "../../lib/meta-config";
|
||||
import Header from "@/components/Header";
|
||||
import Footer from "@/components/Footer";
|
||||
import { useRouter } from "next/router";
|
||||
@ -30,16 +31,17 @@ export default function PaymentCancelled() {
|
||||
router.push('/catalog');
|
||||
};
|
||||
|
||||
const metaConfig = getMetaByPath('/payment/cancelled');
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Оплата отменена - Protekauto</title>
|
||||
<meta name="description" content="Оплата заказа была отменена" />
|
||||
<link href="https://fonts.googleapis.com" rel="preconnect" />
|
||||
<link href="https://fonts.gstatic.com" rel="preconnect" crossOrigin="anonymous" />
|
||||
<link href="/images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
|
||||
<link href="/images/webclip.png" rel="apple-touch-icon" />
|
||||
</Head>
|
||||
<MetaTags
|
||||
title={metaConfig.title}
|
||||
description={metaConfig.description}
|
||||
keywords={metaConfig.keywords}
|
||||
ogTitle={metaConfig.ogTitle}
|
||||
ogDescription={metaConfig.ogDescription}
|
||||
/>
|
||||
|
||||
<Header />
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import Head from "next/head";
|
||||
import MetaTags from "../../components/MetaTags";
|
||||
import { getMetaByPath } from "../../lib/meta-config";
|
||||
import Header from "@/components/Header";
|
||||
import Footer from "@/components/Footer";
|
||||
import { useRouter } from "next/router";
|
||||
@ -40,16 +41,17 @@ export default function PaymentFailed() {
|
||||
router.push('/catalog');
|
||||
};
|
||||
|
||||
const metaConfig = getMetaByPath('/payment/failed');
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Ошибка оплаты - Protekauto</title>
|
||||
<meta name="description" content="Произошла ошибка при оплате заказа" />
|
||||
<link href="https://fonts.googleapis.com" rel="preconnect" />
|
||||
<link href="https://fonts.gstatic.com" rel="preconnect" crossOrigin="anonymous" />
|
||||
<link href="/images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
|
||||
<link href="/images/webclip.png" rel="apple-touch-icon" />
|
||||
</Head>
|
||||
<MetaTags
|
||||
title={metaConfig.title}
|
||||
description={metaConfig.description}
|
||||
keywords={metaConfig.keywords}
|
||||
ogTitle={metaConfig.ogTitle}
|
||||
ogDescription={metaConfig.ogDescription}
|
||||
/>
|
||||
|
||||
<Header />
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import Head from 'next/head';
|
||||
import MetaTags from "../../components/MetaTags";
|
||||
import { getMetaByPath } from "../../lib/meta-config";
|
||||
|
||||
const InvoicePage: React.FC = () => {
|
||||
const router = useRouter();
|
||||
@ -20,12 +21,17 @@ const InvoicePage: React.FC = () => {
|
||||
router.push('/profile/orders');
|
||||
};
|
||||
|
||||
const metaConfig = getMetaByPath('/payment/invoice');
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Счёт на оплату - Протек Авто</title>
|
||||
<meta name="description" content="Счёт на оплату заказа" />
|
||||
</Head>
|
||||
<MetaTags
|
||||
title={metaConfig.title}
|
||||
description={metaConfig.description}
|
||||
keywords={metaConfig.keywords}
|
||||
ogTitle={metaConfig.ogTitle}
|
||||
ogDescription={metaConfig.ogDescription}
|
||||
/>
|
||||
|
||||
<div className="w-layout-vflex" style={{
|
||||
minHeight: '100vh',
|
||||
|
@ -1,11 +1,12 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import Head from "next/head";
|
||||
import Footer from "@/components/Footer";
|
||||
import { useRouter } from "next/router";
|
||||
import { useMutation, ApolloProvider } from "@apollo/client";
|
||||
import { gql } from "@apollo/client";
|
||||
import { apolloClient } from "@/lib/apollo";
|
||||
import toast from "react-hot-toast";
|
||||
import MetaTags from "../../components/MetaTags";
|
||||
import { getMetaByPath } from "../../lib/meta-config";
|
||||
|
||||
const CONFIRM_PAYMENT = gql`
|
||||
mutation ConfirmPayment($orderId: ID!) {
|
||||
@ -74,17 +75,6 @@ function PaymentSuccessContent() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Оплата прошла успешно - Protekauto</title>
|
||||
<meta name="description" content="Ваш заказ успешно оплачен" />
|
||||
<link href="https://fonts.googleapis.com" rel="preconnect" />
|
||||
<link href="https://fonts.gstatic.com" rel="preconnect" crossOrigin="anonymous" />
|
||||
<link href="/images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
|
||||
<link href="/images/webclip.png" rel="apple-touch-icon" />
|
||||
</Head>
|
||||
|
||||
|
||||
|
||||
<div className="w-layout-blockcontainer container info w-container">
|
||||
<div className="w-layout-vflex flex-block-9">
|
||||
<div className="w-layout-hflex flex-block-7">
|
||||
@ -211,9 +201,20 @@ function PaymentSuccessContent() {
|
||||
}
|
||||
|
||||
export default function PaymentSuccess() {
|
||||
const metaConfig = getMetaByPath('/payment/success');
|
||||
|
||||
return (
|
||||
<ApolloProvider client={apolloClient}>
|
||||
<PaymentSuccessContent />
|
||||
</ApolloProvider>
|
||||
<>
|
||||
<MetaTags
|
||||
title={metaConfig.title}
|
||||
description={metaConfig.description}
|
||||
keywords={metaConfig.keywords}
|
||||
ogTitle={metaConfig.ogTitle}
|
||||
ogDescription={metaConfig.ogDescription}
|
||||
/>
|
||||
<ApolloProvider client={apolloClient}>
|
||||
<PaymentSuccessContent />
|
||||
</ApolloProvider>
|
||||
</>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user