Skip to content

Commit

Permalink
Merge pull request #1718 from garyadaptive/fix/build-version-env
Browse files Browse the repository at this point in the history
fix(client): use correct env var for build version
  • Loading branch information
garyadaptive authored Dec 11, 2020
2 parents a6eccdf + 0cecf59 commit 96b6fe7
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,22 @@ const FooterVersion: FC = () => {

const URL =
'https://github.com/AdaptiveConsulting/ReactiveTraderCloud/releases/tag/' +
process.env.REACT_APP_VERSION
process.env.REACT_APP_BUILD_VERSION

useEffect(() => {
gitTagExists(process.env.REACT_APP_VERSION).then(resolution => setVersionExists(resolution))
gitTagExists(process.env.REACT_APP_BUILD_VERSION).then(resolution =>
setVersionExists(resolution)
)
}, [])

return (
<Wrapper>
{versionExists ? (
<Link target="_blank" href={URL}>
{process.env.REACT_APP_VERSION}
{process.env.REACT_APP_BUILD_VERSION}
</Link>
) : (
<p>{process.env.REACT_APP_VERSION}</p>
<p>{process.env.REACT_APP_BUILD_VERSION}</p>
)}
</Wrapper>
)
Expand Down

0 comments on commit 96b6fe7

Please sign in to comment.