Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mastodon
GitHub Repository: mastodon/joinmastodon
Path: blob/main/pages/_document.js
1006 views
1
import Document, { Html, Head, Main, NextScript } from "next/document"
2
import { getDirForLocale } from "../utils/locales"
3
4
class MyDocument extends Document {
5
static async getInitialProps(ctx) {
6
const initialProps = await Document.getInitialProps(ctx)
7
return { ...initialProps }
8
}
9
10
render() {
11
const dir = getDirForLocale(this.props?.locale)
12
return (
13
<Html dir={dir}>
14
<Head>
15
<meta name="apple-itunes-app" content="app-id=1571998974" />
16
<meta name="twitter:site" content="@joinmastodon" />
17
</Head>
18
<body className="bg-white">
19
<Main />
20
<NextScript />
21
<script data-mode="hash" async src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
22
<script async src="https://scripts.simpleanalyticscdn.com/auto-events.js"></script>
23
</body>
24
</Html>
25
)
26
}
27
}
28
29
export default MyDocument
30
31