diff --git a/src/components/App/__test__/__snapshots__/App.test.js.snap b/src/components/App/__test__/__snapshots__/App.test.js.snap index 3fa9128..fec5fc3 100644 --- a/src/components/App/__test__/__snapshots__/App.test.js.snap +++ b/src/components/App/__test__/__snapshots__/App.test.js.snap @@ -20,6 +20,7 @@ exports[` snapshot 1`] = ` >

undefined diff --git a/src/components/Avatar/Avatar.js b/src/components/Avatar/Avatar.js index f8f8c02..dbb873a 100644 --- a/src/components/Avatar/Avatar.js +++ b/src/components/Avatar/Avatar.js @@ -1,11 +1,13 @@ import React, { memo } from 'react'; import { string } from 'prop-types'; import { addShadow } from '../../utils'; +import { runtimeConfig } from '../../config'; import './Avatar.css'; function Avatar(props) { const { src, srcSet, alt } = props; + const avatarSize = runtimeConfig.AVATAR_SIZE || null; return ( {alt} ); } diff --git a/src/components/Avatar/__test__/__snapshots__/Avatar.test.js.snap b/src/components/Avatar/__test__/__snapshots__/Avatar.test.js.snap index 493c7b1..a7e6161 100644 --- a/src/components/Avatar/__test__/__snapshots__/Avatar.test.js.snap +++ b/src/components/Avatar/__test__/__snapshots__/Avatar.test.js.snap @@ -3,5 +3,6 @@ exports[` snapshot 1`] = ` `; diff --git a/src/components/Home/__test__/__snapshots__/Home.test.js.snap b/src/components/Home/__test__/__snapshots__/Home.test.js.snap index c3a1f86..5dbf1df 100644 --- a/src/components/Home/__test__/__snapshots__/Home.test.js.snap +++ b/src/components/Home/__test__/__snapshots__/Home.test.js.snap @@ -17,6 +17,7 @@ exports[` snapshot 1`] = ` >

undefined diff --git a/src/config.js b/src/config.js index 906f62e..5b41615 100644 --- a/src/config.js +++ b/src/config.js @@ -16,6 +16,7 @@ export const runtimeConfig = THEME: window?.env?.THEME, FAVICON_URL: window?.env?.FAVICON_URL, AVATAR_URL: window?.env?.AVATAR_URL, + AVATAR_SIZE: window?.env?.AVATAR_SIZE, AVATAR_ALT: window?.env?.AVATAR_ALT, AVATAR_2X_URL: window?.env?.AVATAR_2X_URL, NAME: window?.env?.NAME, @@ -183,6 +184,9 @@ export const runtimeConfig = AVATAR_URL: nodeIsProduction ? process.env.AVATAR_URL : process.env.RAZZLE_AVATAR_URL, + AVATAR_SIZE: nodeIsProduction + ? process.env.AVATAR_SIZE + : process.env.RAZZLE_AVATAR_SIZE, AVATAR_ALT: nodeIsProduction ? process.env.AVATAR_ALT : process.env.RAZZLE_AVATAR_ALT,