Skip to content

Commit

Permalink
Change config var name from STEEMCONNECT_IMG_HOST to IMG_HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
bonustrack committed Oct 21, 2017
1 parent 022b6ac commit 8a00786
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"dev-server:auth-server": "node ./server/auth-server.js",
"start": "cross-env NODE_ENV=production npm run run:server",
"dev": "cross-env NODE_ENV=development run-p build:server:dev run:server",
"test": "cross-env STEEMCONNECT_IMG_HOST=https://img.busy.org jest",
"test:watch": "cross-env STEEMCONNECT_IMG_HOST=https://img.busy.org jest --watch",
"test:coverage": "cross-env STEEMCONNECT_IMG_HOST=https://img.busy.org jest --coverage",
"test": "cross-env IMG_HOST=https://img.busy.org jest",
"test:watch": "cross-env IMG_HOST=https://img.busy.org jest --watch",
"test:coverage": "cross-env IMG_HOST=https://img.busy.org jest --coverage",
"eslint-autofix": "eslint --fix \"src/**/*.js\"",
"lint": "eslint \"src/**/*.js\"",
"run:server": "nodemon --watch busy.server.js busy.server.js",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Avatar = ({ username, size }) =>
className="Avatar"
style={{ minWidth: `${size}px`, width: `${size}px`, height: `${size}px` }}
alt={username}
src={`${process.env.STEEMCONNECT_IMG_HOST}/@${username || 'steemconnect'}?s=${size}`}
src={`${process.env.IMG_HOST}/@${username || 'steemconnect'}?s=${size}`}
/>);

Avatar.propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/UserHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const UserHeader = ({
}) => (
<div
className={classNames('UserHeader', { 'UserHeader--cover': hasCover })}
style={{ backgroundImage: `url("${process.env.STEEMCONNECT_IMG_HOST}/@${handle}/cover")` }}
style={{ backgroundImage: `url("${process.env.IMG_HOST}/@${handle}/cover")` }}
>
<div className="UserHeader__container">
<Avatar username={handle} size={100} />
Expand Down
2 changes: 1 addition & 1 deletion src/post/PostContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class PostContent extends React.Component {
const htmlBody = getHtml(body, {}, 'text');
const bodyText = sanitize(htmlBody, { allowedTags: [] });
const desc = `${bodyText.substring(0, 140)} by ${author}`;
const image = postMetaImage || `${process.env.STEEMCONNECT_IMG_HOST}/@${author}`;
const image = postMetaImage || `${process.env.IMG_HOST}/@${author}`;
const canonicalUrl = `${canonicalHost}${content.url}`;
const url = `${busyHost}${content.url}`;
const metaTitle = `${title} - Busy`;
Expand Down
2 changes: 1 addition & 1 deletion src/user/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default class User extends React.Component {
const { profile = {} } = user.json_metadata || {};
const busyHost = global.postOrigin || 'https://busy.org';
const desc = profile.about || `Post by ${username}`;
const image = `${process.env.STEEMCONNECT_IMG_HOST}/@${username}`;
const image = `${process.env.IMG_HOST}/@${username}`;
const canonicalUrl = `${busyHost}/@${username}`;
const url = `${busyHost}/@${username}`;
const displayedUsername = profile.name || username || '';
Expand Down
2 changes: 1 addition & 1 deletion webpack/makeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function makePlugins(options) {
// This has effect on the react lib size
NODE_ENV: isDevelopment ? JSON.stringify('development') : JSON.stringify('production'),
ENABLE_LOGGER: JSON.stringify(process.env.ENABLE_LOGGER),
STEEMCONNECT_IMG_HOST: JSON.stringify(process.env.STEEMCONNECT_IMG_HOST || 'https://img.busy.org'),
IMG_HOST: JSON.stringify(process.env.IMG_HOST || 'https://img.busy.org'),
SENTRY_PUBLIC_DSN: isDevelopment ? null : JSON.stringify(process.env.SENTRY_PUBLIC_DSN),
STEEMCONNECT_CLIENT_ID: JSON.stringify(process.env.STEEMCONNECT_CLIENT_ID || 'busy.app'),
STEEMCONNECT_REDIRECT_URL: JSON.stringify(process.env.STEEMCONNECT_REDIRECT_URL || 'http://localhost:3000/callback'),
Expand Down
2 changes: 1 addition & 1 deletion webpack/webpack-dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
'process.env': {
NODE_ENV: JSON.stringify('development'),
ENABLE_LOGGER: JSON.stringify(process.env.ENABLE_LOGGER),
STEEMCONNECT_IMG_HOST: JSON.stringify(process.env.STEEMCONNECT_IMG_HOST || 'https://img.busy.org'),
IMG_HOST: JSON.stringify(process.env.IMG_HOST || 'https://img.busy.org'),
SENTRY_PUBLIC_DSN: null,
STEEMCONNECT_CLIENT_ID: JSON.stringify(process.env.STEEMCONNECT_CLIENT_ID || 'busy.app'),
STEEMCONNECT_REDIRECT_URL: JSON.stringify(process.env.STEEMCONNECT_REDIRECT_URL || 'http://localhost:3000/callback'),
Expand Down
2 changes: 1 addition & 1 deletion webpack/webpack.server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = {
plugins: [
new webpack.DefinePlugin({
'process.env': {
STEEMCONNECT_IMG_HOST: JSON.stringify(process.env.STEEMCONNECT_IMG_HOST || 'https://img.busy.org'),
IMG_HOST: JSON.stringify(process.env.IMG_HOST || 'https://img.busy.org'),
STEEMCONNECT_CLIENT_ID: JSON.stringify(process.env.STEEMCONNECT_CLIENT_ID || 'busy.app'),
STEEMCONNECT_REDIRECT_URL: JSON.stringify(process.env.STEEMCONNECT_REDIRECT_URL || 'http://localhost:3000/callback'),
STEEMCONNECT_HOST: JSON.stringify(process.env.STEEMCONNECT_HOST || 'https://v2.steemconnect.com'),
Expand Down

0 comments on commit 8a00786

Please sign in to comment.