mirror of
https://github.com/dzeiocom/markblog.git
synced 2025-07-29 07:59:50 +00:00
Fixed linting 😃
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
@ -1,18 +1,14 @@
|
||||
import Document, { Head, Html, Main, NextScript } from 'next/document'
|
||||
import React from 'react'
|
||||
|
||||
import Document, { Head, Html, Main, NextScript, DocumentContext } from 'next/document'
|
||||
import config from '../config'
|
||||
|
||||
class MyDocument extends Document {
|
||||
public static async getInitialProps(ctx) {
|
||||
public static async getInitialProps(ctx: DocumentContext) {
|
||||
const initialProps = await Document.getInitialProps(ctx)
|
||||
return { ...initialProps }
|
||||
}
|
||||
|
||||
public componentDidMount() {
|
||||
if (window.location.origin !== config.domain && window.location.hostname !== "localhost") {
|
||||
window.location.replace(`${config.domain}${window.location.pathname}`)
|
||||
}
|
||||
}
|
||||
|
||||
public render() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
|
Reference in New Issue
Block a user