-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7a1a26
commit 26fa66c
Showing
4 changed files
with
175 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,45 @@ | ||
import { generateClassName } from "@/theme"; | ||
import { ServerStyleSheets } from "@mui/styles"; | ||
import Document, { | ||
DocumentContext, | ||
Head, | ||
Html, | ||
Main, | ||
NextScript, | ||
} from "next/document"; | ||
import { | ||
documentGetInitialProps, | ||
DocumentHeadTags, | ||
} from "@mui/material-nextjs/v14-pagesRouter"; | ||
import { DocumentContext, Head, Html, Main, NextScript } from "next/document"; | ||
import * as React from "react"; | ||
|
||
export default class extends Document { | ||
static getInitialProps = async (ctx: DocumentContext) => { | ||
const sheets = new ServerStyleSheets({ | ||
serverGenerateClassName: generateClassName, | ||
}); | ||
export default function Document(props: any) { | ||
return ( | ||
<Html> | ||
<Head> | ||
<DocumentHeadTags {...props} /> | ||
|
||
const originalRenderPage = ctx.renderPage; | ||
ctx.renderPage = () => | ||
originalRenderPage({ | ||
enhanceApp: (App) => (props) => sheets.collect(<App {...props} />), | ||
}); | ||
|
||
const initialProps = await Document.getInitialProps(ctx); | ||
|
||
return { | ||
...initialProps, | ||
styles: [ | ||
...React.Children.toArray(initialProps.styles), | ||
sheets.getStyleElement(), | ||
], | ||
}; | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Html> | ||
<Head> | ||
<link | ||
rel="apple-touch-icon" | ||
sizes="180x180" | ||
href="/apple-touch-icon.png" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="32x32" | ||
href="/favicon-32x32.png" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="16x16" | ||
href="/favicon-16x16.png" | ||
/> | ||
<link rel="manifest" href="/site.webmanifest" /> | ||
<meta name="msapplication-TileColor" content="#da532c" /> | ||
<meta name="theme-color" content="#ffffff" /> | ||
</Head> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
); | ||
} | ||
<link | ||
rel="apple-touch-icon" | ||
sizes="180x180" | ||
href="/apple-touch-icon.png" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="32x32" | ||
href="/favicon-32x32.png" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="16x16" | ||
href="/favicon-16x16.png" | ||
/> | ||
<link rel="manifest" href="/site.webmanifest" /> | ||
<meta name="msapplication-TileColor" content="#da532c" /> | ||
<meta name="theme-color" content="#ffffff" /> | ||
</Head> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
); | ||
} | ||
|
||
(Document as any).getInitialProps = async (ctx: DocumentContext) => { | ||
return await documentGetInitialProps(ctx); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,6 +236,16 @@ | |
"@emotion/utils" "^1.4.2" | ||
csstype "^3.0.2" | ||
|
||
"@emotion/server@^11.11.0": | ||
version "11.11.0" | ||
resolved "https://registry.yarnpkg.com/@emotion/server/-/server-11.11.0.tgz#35537176a2a5ed8aed7801f254828e636ec3bd6e" | ||
integrity sha512-6q89fj2z8VBTx9w93kJ5n51hsmtYuFPtZgnc1L8VzRx9ti4EU6EyvF6Nn1H1x3vcCQCF7u2dB2lY4AYJwUW4PA== | ||
dependencies: | ||
"@emotion/utils" "^1.2.1" | ||
html-tokenize "^2.0.0" | ||
multipipe "^1.0.2" | ||
through "^2.3.8" | ||
|
||
"@emotion/sheet@^1.4.0": | ||
version "1.4.0" | ||
resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.4.0.tgz#c9299c34d248bc26e82563735f78953d2efca83c" | ||
|
@@ -263,7 +273,7 @@ | |
resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.2.0.tgz#8a8cb77b590e09affb960f4ff1e9a89e532738bf" | ||
integrity sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg== | ||
|
||
"@emotion/utils@^1.4.2": | ||
"@emotion/utils@^1.2.1", "@emotion/utils@^1.4.2": | ||
version "1.4.2" | ||
resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.4.2.tgz#6df6c45881fcb1c412d6688a311a98b7f59c1b52" | ||
integrity sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA== | ||
|
@@ -483,6 +493,13 @@ | |
resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.16.14.tgz#e6536f1b6caa873f7915fbf9703fdc840a5a98d9" | ||
integrity sha512-sbjXW+BBSvmzn61XyTMun899E7nGPTXwqD9drm1jBUAvWEhJpPFIRxwQQiATWZnd9rvdxtnhhdsDxEGWI0jxqA== | ||
|
||
"@mui/material-nextjs@^6.3.1": | ||
version "6.3.1" | ||
resolved "https://registry.yarnpkg.com/@mui/material-nextjs/-/material-nextjs-6.3.1.tgz#b9e033272b1c8af4664e0343cb790fc7027cde8d" | ||
integrity sha512-14Y9wHdGsxI7u9XiMlpK5L6+MTsGo3Pod0EqwEde3jMx6dv63uqnMokhC1mzIJ3PjWtG8FwJkDsl57O9H6d+gQ== | ||
dependencies: | ||
"@babel/runtime" "^7.26.0" | ||
|
||
"@mui/material@^5.0.0": | ||
version "5.16.14" | ||
resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.16.14.tgz#da8a75822f039d8c1b0ab7fb4146d767c2f9248a" | ||
|
@@ -2573,6 +2590,11 @@ buffer-from@^1.0.0: | |
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" | ||
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== | ||
|
||
buffer-from@~0.1.1: | ||
version "0.1.2" | ||
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.2.tgz#15f4b9bcef012044df31142c14333caf6e0260d0" | ||
integrity sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg== | ||
|
||
[email protected]: | ||
version "1.6.0" | ||
resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" | ||
|
@@ -3016,6 +3038,13 @@ dom-helpers@^5.0.1: | |
"@babel/runtime" "^7.8.7" | ||
csstype "^3.0.2" | ||
|
||
duplexer2@^0.1.2: | ||
version "0.1.4" | ||
resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" | ||
integrity sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA== | ||
dependencies: | ||
readable-stream "^2.0.2" | ||
|
||
earcut@^2.2.4: | ||
version "2.2.4" | ||
resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.4.tgz#6d02fd4d68160c114825d06890a92ecaae60343a" | ||
|
@@ -3165,6 +3194,17 @@ html-encoding-sniffer@^4.0.0: | |
dependencies: | ||
whatwg-encoding "^3.1.1" | ||
|
||
html-tokenize@^2.0.0: | ||
version "2.0.1" | ||
resolved "https://registry.yarnpkg.com/html-tokenize/-/html-tokenize-2.0.1.tgz#c3b2ea6e2837d4f8c06693393e9d2a12c960be5f" | ||
integrity sha512-QY6S+hZ0f5m1WT8WffYN+Hg+xm/w5I8XeUcAq/ZYP5wVC8xbKi4Whhru3FtrAebD5EhBW8rmFzkDI6eCAuFe2w== | ||
dependencies: | ||
buffer-from "~0.1.1" | ||
inherits "~2.0.1" | ||
minimist "~1.2.5" | ||
readable-stream "~1.0.27-1" | ||
through2 "~0.4.1" | ||
|
||
http-basic@^6.0.0: | ||
version "6.0.0" | ||
resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-6.0.0.tgz#1d63df8f891e1e25e0c2c84d7a2d94702d6ae229" | ||
|
@@ -3232,7 +3272,7 @@ import-fresh@^3.2.1: | |
parent-module "^1.0.0" | ||
resolve-from "^4.0.0" | ||
|
||
inherits@^2.0.3, inherits@~2.0.3: | ||
inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: | ||
version "2.0.4" | ||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" | ||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== | ||
|
@@ -3274,6 +3314,11 @@ is-wsl@^1.1.0: | |
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" | ||
integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= | ||
|
||
[email protected]: | ||
version "0.0.1" | ||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" | ||
integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== | ||
|
||
isarray@~1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" | ||
|
@@ -3477,6 +3522,11 @@ mime-types@^2.1.12: | |
dependencies: | ||
mime-db "1.44.0" | ||
|
||
minimist@~1.2.5: | ||
version "1.2.8" | ||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" | ||
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== | ||
|
||
mjolnir.js@^2.7.0: | ||
version "2.7.1" | ||
resolved "https://registry.yarnpkg.com/mjolnir.js/-/mjolnir.js-2.7.1.tgz#4e12590fe168b377c9c669b9c31aa5a62f8b8460" | ||
|
@@ -3519,6 +3569,14 @@ msgpackr@^1.10.1: | |
optionalDependencies: | ||
msgpackr-extract "^3.0.2" | ||
|
||
multipipe@^1.0.2: | ||
version "1.0.2" | ||
resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-1.0.2.tgz#cc13efd833c9cda99f224f868461b8e1a3fd939d" | ||
integrity sha512-6uiC9OvY71vzSGX8lZvSqscE7ft9nPupJ8fMjrCNRAUy2LREUW42UL+V/NTrogr6rFgRydUrCX4ZitfpSNkSCQ== | ||
dependencies: | ||
duplexer2 "^0.1.2" | ||
object-assign "^4.1.0" | ||
|
||
nanoid@^3.3.6: | ||
version "3.3.8" | ||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" | ||
|
@@ -3559,11 +3617,16 @@ nwsapi@^2.2.16: | |
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.16.tgz#177760bba02c351df1d2644e220c31dfec8cdb43" | ||
integrity sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ== | ||
|
||
object-assign@^4, object-assign@^4.1.1: | ||
object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: | ||
version "4.1.1" | ||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" | ||
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= | ||
|
||
object-keys@~0.4.0: | ||
version "0.4.0" | ||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" | ||
integrity sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw== | ||
|
||
opn@^5.3.0: | ||
version "5.5.0" | ||
resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" | ||
|
@@ -3739,6 +3802,19 @@ react@^18.3.1: | |
dependencies: | ||
loose-envify "^1.1.0" | ||
|
||
readable-stream@^2.0.2: | ||
version "2.3.8" | ||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" | ||
integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== | ||
dependencies: | ||
core-util-is "~1.0.0" | ||
inherits "~2.0.3" | ||
isarray "~1.0.0" | ||
process-nextick-args "~2.0.0" | ||
safe-buffer "~5.1.1" | ||
string_decoder "~1.1.1" | ||
util-deprecate "~1.0.1" | ||
|
||
readable-stream@^2.2.2: | ||
version "2.3.7" | ||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" | ||
|
@@ -3752,6 +3828,16 @@ readable-stream@^2.2.2: | |
string_decoder "~1.1.1" | ||
util-deprecate "~1.0.1" | ||
|
||
readable-stream@~1.0.17, readable-stream@~1.0.27-1: | ||
version "1.0.34" | ||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" | ||
integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== | ||
dependencies: | ||
core-util-is "~1.0.0" | ||
inherits "~2.0.1" | ||
isarray "0.0.1" | ||
string_decoder "~0.10.x" | ||
|
||
regenerator-runtime@^0.14.0: | ||
version "0.14.1" | ||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" | ||
|
@@ -3845,6 +3931,11 @@ streamsearch@^1.1.0: | |
resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" | ||
integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== | ||
|
||
string_decoder@~0.10.x: | ||
version "0.10.31" | ||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" | ||
integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== | ||
|
||
string_decoder@~1.1.1: | ||
version "1.1.1" | ||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" | ||
|
@@ -3919,6 +4010,19 @@ then-request@^5.0.0: | |
promise "^8.0.0" | ||
qs "^6.4.0" | ||
|
||
through2@~0.4.1: | ||
version "0.4.2" | ||
resolved "https://registry.yarnpkg.com/through2/-/through2-0.4.2.tgz#dbf5866031151ec8352bb6c4db64a2292a840b9b" | ||
integrity sha512-45Llu+EwHKtAZYTPPVn3XZHBgakWMN3rokhEv5hu596XP+cNgplMg+Gj+1nmAvj+L0K7+N49zBKx5rah5u0QIQ== | ||
dependencies: | ||
readable-stream "~1.0.17" | ||
xtend "~2.1.1" | ||
|
||
through@^2.3.8: | ||
version "2.3.8" | ||
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" | ||
integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== | ||
|
||
tiny-warning@^1.0.2: | ||
version "1.0.3" | ||
resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" | ||
|
@@ -4097,6 +4201,13 @@ xmlchars@^2.2.0: | |
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" | ||
integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== | ||
|
||
xtend@~2.1.1: | ||
version "2.1.2" | ||
resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" | ||
integrity sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ== | ||
dependencies: | ||
object-keys "~0.4.0" | ||
|
||
yaml@^1.10.0: | ||
version "1.10.2" | ||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" | ||
|