-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
render git commit info if env var is set
took out h1
- Loading branch information
Showing
5 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Link } from "react-router-dom"; | ||
import "../css/GitDetails.scss"; | ||
|
||
const GitDetails = () => { | ||
const gitCommit = process.env.REACT_APP_GIT_COMMIT; | ||
if (!gitCommit) { | ||
return null; | ||
} | ||
return ( | ||
<div className="git-detail-section"> | ||
<p> | ||
This site is running commit{" "} | ||
<Link to={`https://github.com/VTUL/dlp-access/commit/${gitCommit}`}> | ||
{gitCommit.substring(0, 7)} | ||
</Link>{" "} | ||
of the{" "} | ||
<Link to={"https://github.com/VTUL/dlp-access/"}>vtdlp-access</Link>{" "} | ||
project | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export { GitDetails }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.git-detail-section { | ||
position: relative; | ||
display: block; | ||
background-color: var(--light-gray); | ||
width: 100%; | ||
margin-bottom: 15px; | ||
padding: 10px; | ||
p { | ||
position: relative; | ||
display: block; | ||
text-align: center; | ||
font-family: "gineso-condensed", sans-serif; | ||
a, | ||
a:visited { | ||
position: relative; | ||
color: var(--themeHighlightColor); | ||
cursor: pointer; | ||
} | ||
} | ||
} |