From ffa2731e0edd259ddc6c9f77d81df77a6a07af67 Mon Sep 17 00:00:00 2001 From: Chika Date: Fri, 20 May 2022 11:32:13 +0300 Subject: [PATCH] html: use favicon.prod.ico for production server --- .env.production | 4 ++++ pages/_document.jsx | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.env.production b/.env.production index 23a31e3..28b3c72 100644 --- a/.env.production +++ b/.env.production @@ -2,3 +2,7 @@ NEXT_PUBLIC_COLOR_PRIMARY=#1C01A9 NEXT_PUBLIC_COLOR_SECONDARY=#3A0185 NEXT_PUBLIC_COLOR_TERTIARTY=#580161 + + +####### ICONS ######## +NEXT_PUBLIC_FAVICON=favicon.prod.ico \ No newline at end of file diff --git a/pages/_document.jsx b/pages/_document.jsx index 97ad5a3..3e92df8 100644 --- a/pages/_document.jsx +++ b/pages/_document.jsx @@ -7,11 +7,13 @@ export default class MyDocument extends Document { const originalRenderPage = ctx.renderPage; try { - ctx.renderPage = () => originalRenderPage({ + ctx.renderPage = () => + originalRenderPage({ enhanceApp: (App) => (props) => sheet.collectStyles(), }); const initialProps = await Document.getInitialProps(ctx); + return { ...initialProps, styles: ( @@ -46,7 +48,7 @@ export default class MyDocument extends Document {