Skip to content

Commit

Permalink
feat: added console output VITE_REACT_APP_GIT_TAG and VITE_REACT_APP_…
Browse files Browse the repository at this point in the history
…GIT_DATE value #4
  • Loading branch information
nadyasav committed Oct 10, 2023
1 parent 71a9c03 commit 2f36072
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 8 additions & 5 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,25 @@ import DevModeToggle from './components/devModeToggle/DevModeToggle';
function App() {
const [count, setCount] = useState(0);
const [devModeState, setDevModeState] = useState(false);
const versionDeploy = import.meta.env.VITE_REACT_APP_GIT_TAG;
const dateDeploy = import.meta.env.VITE_REACT_APP_GIT_DATE;
const versionGitTag = import.meta.env.VITE_REACT_APP_GIT_TAG;
const gitDate = import.meta.env.VITE_REACT_APP_GIT_DATE;

console.log('VITE_REACT_APP_GIT_TAG - ', versionGitTag);
console.log('VITE_REACT_APP_GIT_DATE - ', gitDate);

const handleToggleDevMode = (value: boolean) => {
setDevModeState(value);
};

return (
<div className='app appBox'>
{versionDeploy && dateDeploy && (
{versionGitTag && gitDate && (
<div>
<DevModeToggle isDevMode={devModeState} handleToggleDevMode={handleToggleDevMode} />
{devModeState && (
<div>
<p>Version: {versionDeploy}</p>
<p>Date: {dateDeploy}</p>
<p>Version: {versionGitTag}</p>
<p>Date: {gitDate}</p>
</div>
)}
</div>
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/scss/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ select {
padding: 0;
font: inherit;
}
button:focus {outline:0;}
button:focus {
outline: 0;
}

0 comments on commit 2f36072

Please sign in to comment.