Skip to content

Commit

Permalink
display copyright and version number at bottom of page
Browse files Browse the repository at this point in the history
  • Loading branch information
timrobinson33 committed Apr 10, 2021
1 parent 7cac7f5 commit 8b485ab
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
/.project
/src/autobuild_version.js
43 changes: 43 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"build": "genversion --es6 src/autobuild_version.js && react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"predeploy": "npm run build",
Expand All @@ -41,6 +41,7 @@
"devDependencies": {
"@testing-library/dom": "^7.30.3",
"@testing-library/user-event": "^12.8.3",
"genversion": "^2.3.1",
"gh-pages": "^3.1.0"
}
}
10 changes: 9 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ div.box {
background-color: paleturquoise;
border: 1px solid grey;
padding: 0.5rem;
}
}

div.copyright {
text-align: center;
color: grey;
font-size: 0.7rem;
font-style: italic;
margin-top: 5rem;
}
4 changes: 4 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useState } from 'react'
import 'mvp.css'
import './App.css'
import _ from 'lodash'
import { version as appVersion } from './autobuild_version'

const divide = '\u00f7'

Expand Down Expand Up @@ -276,5 +277,8 @@ export default function App() {
? <MainView />
: <Disclaimer callback={() => setDisclaimerAgreed(true)} />
}
<div className="copyright">
Version {appVersion}. Copyright (c) Tim Robinson https://github.com/timrobinson33
</div>
</>
}

0 comments on commit 8b485ab

Please sign in to comment.