فهرست منبع

Fix no_document_head warn in next.js

Akash 7 سال پیش
والد
کامیت
9f81710d49
2فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 0
      client/pages/_app.js
  2. 0 1
      client/pages/_document.js

+ 4 - 0
client/pages/_app.js

@@ -1,4 +1,5 @@
 import App, { Container } from 'next/app';
+import Head from 'next/head';
 import React from 'react';
 import { Provider } from 'react-redux';
 import withReduxStore from '../with-redux-store';
@@ -8,6 +9,9 @@ class MyApp extends App {
     const { Component, pageProps, reduxStore } = this.props;
     return (
       <Container>
+        <Head>
+          <title>Kutt.it | Modern Open Source URL shortener.</title>
+        </Head>
         <Provider store={reduxStore}>
           <Component {...pageProps} />
         </Provider>

+ 0 - 1
client/pages/_document.js

@@ -25,7 +25,6 @@ class AppDocument extends Document {
         <Head>
           <meta charSet="utf-8" />
           <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
-          <title>Kutt.it | Modern Open Source URL shortener.</title>
           <meta
             name="description"
             content="Kutt.it is a free and open source URL shortener with custom domains and stats."