Added Time information to github

This commit is contained in:
Camerin Figueroa 2021-12-23 18:18:58 -05:00
parent d4df31a80b
commit d93b8a52ff
2 changed files with 16 additions and 1 deletions

View File

@ -51,6 +51,8 @@ class Github extends React.Component {
if (this.props.repos.length > 0) {
// Render each repo
const render = this.props.repos.map((repo) =>{
let updated = (new Date (repo.updated_at)).toLocaleString();
let created = (new Date (repo.created_at)).toLocaleString();
return (
<div className="repo" key={repo.id}>
@ -74,6 +76,11 @@ class Github extends React.Component {
this.renderLanguages(repo.name) // Render each language for the repo
}
</div>
<div className="times">
Last Updated: {updated}
<br/>
Created: {created}
</div>
</div>
);

View File

@ -61,7 +61,7 @@
.repo .description {
flex-grow: 1;
padding:10px;
padding:5px;
}
.repo .languages {
@ -82,6 +82,14 @@
color: #DAD4DF;
}
.repo .times {
padding: 5px;
margin: 2px;
margin-left: 5px;
width: 100%;
text-align: start;
}
.content {
margin: 25px;
text-align: center;