mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-26 04:19:49 +03:00
feat(_document): add extension element
This commit is contained in:
parent
e05aba7f51
commit
9ed780f1db
25
pages/_document.js
Normal file
25
pages/_document.js
Normal file
@ -0,0 +1,25 @@
|
||||
import Document, { Html, Head, Main, NextScript } from "next/document";
|
||||
|
||||
class MyDocument extends Document {
|
||||
static async getInitialProps(ctx) {
|
||||
const initialProps = await Document.getInitialProps(ctx);
|
||||
return { ...initialProps };
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Html>
|
||||
<Head />
|
||||
<body>
|
||||
{/** NOTE(amine): used to communicate with the extension via classNames.
|
||||
* e.g. if the extension is installed on the user's browser, it will add 'isDownloaded' to className*/}
|
||||
<div id="chrome_extension" />
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default MyDocument;
|
Loading…
Reference in New Issue
Block a user