Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Change environment variable for publicUrl to use app.config
Browse files Browse the repository at this point in the history
  • Loading branch information
devcshort committed Sep 9, 2021
1 parent 0fa6ceb commit e25323f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Document, { Html, Head, Main, NextScript } from 'next/document';
import { ServerStyleSheet } from 'styled-components';
import { ServerStyleSheets } from '@material-ui/core';
import { getAppConfigValue } from '@util/getAppConfigValue';

export default class MyDocument extends Document {
static async getInitialProps(ctx) {
Expand Down Expand Up @@ -39,7 +40,7 @@ export default class MyDocument extends Document {
<meta charSet="utf-8" />
<meta
property="og:image"
content={`${process.env.NEXT_PUBLIC_URL}/ogimage.png`}
content={`${getAppConfigValue('publicUrl')}/ogimage.png`}
/>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
Expand Down

0 comments on commit e25323f

Please sign in to comment.