Skip to content

Commit

Permalink
Merge pull request #9 from input-output-hk/evm
Browse files Browse the repository at this point in the history
Parametise Mantis VMs
  • Loading branch information
craigem committed Feb 26, 2021
2 parents 3eb26a7 + 3d8b13a commit d72aa0d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ mkYarnPackage {
WEB3_PROVIDER = "/rpc/node";
BABEL_ENV = "development";
NODE_ENV = "development";
MANTIS_VM = "VM_Name";

doCheck = true;
checkPhase = "yarn test --coverage --ci";
distPhase = "true";

patchPhase = ''
substituteInPlace public/index.html --replace "{process.env.MANTIS_VM}" "$MANTIS_VM"
substituteInPlace src/components/layout/Header.js --replace "{process.env.MANTIS_VM}" "$MANTIS_VM"
'';

buildPhase = ''
export HOME="$NIX_BUILD_TOP"
yarn run build
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Mantis Sagano Explorer</title>
<title>{process.env.MANTIS_VM} DevNet Explorer</title>
</head>
<body id="body">
<noscript>
Expand Down
4 changes: 2 additions & 2 deletions src/components/layout/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Header extends Component {
<div className="pure-menu">
<ul className="pure-menu-list">
<li className="pure-menu-item">
<a href={`${process.env.PUBLIC_URL}/`} className="pure-menu-link title"> Mantis Sagano Explorer </a>
<a href={`${process.env.PUBLIC_URL}/`} className="pure-menu-link title"> {process.env.MANTIS_VM} DevNet Explorer </a>
</li>
</ul>
</div>
Expand All @@ -53,4 +53,4 @@ class Header extends Component {
}
}

export default Header;
export default Header;

0 comments on commit d72aa0d

Please sign in to comment.