Skip to content

Commit

Permalink
Re-add dynamic version environment variable
Browse files Browse the repository at this point in the history
Compatible with create-react-app

Closes #81
  • Loading branch information
n-hebert committed Apr 5, 2024
1 parent b4d7ff4 commit 8a1e4e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_ELECTRIFY_VERSION=0.1.0
2 changes: 1 addition & 1 deletion src/components/views/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function Settings(props: Props): JSX.Element {
<div style={{textAlign: 'center', margin: '20px 0', lineHeight: '30px'}}>
<Checkbox color="primary" id="sound" checked={props.settings.audioEnabled} onChange={(e: any) => props.onAudioChange(e.target.checked)}/>
{(props.settings.audioEnabled) ? 'Music and sound effects enabled.' : 'Music and sound effects disabled.'}
<Typography className="version">Electrify App v0.8</Typography>
<Typography className="version">Electrify App v{process.env.REACT_APP_ELECTRIFY_VERSION}</Typography>
<Typography className="github"><a href="https://github.com/toddmedema/electrify" target="_blank" rel="noreferrer">GitHub</a></Typography>
</div>
</div>
Expand Down

0 comments on commit 8a1e4e0

Please sign in to comment.