From c1d2f967fd03cab0d72ea0c8fc65a19779408f52 Mon Sep 17 00:00:00 2001 From: Camerin Figueroa Date: Thu, 23 Dec 2021 18:18:58 -0500 Subject: [PATCH] Added Time information to github --- src/components/Github.js | 7 +++++++ src/components/css/Github.css | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/Github.js b/src/components/Github.js index 15abaaf..aa33e0d 100644 --- a/src/components/Github.js +++ b/src/components/Github.js @@ -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 (
@@ -74,6 +76,11 @@ class Github extends React.Component { this.renderLanguages(repo.name) // Render each language for the repo }
+
+ Last Updated: {updated} +
+ Created: {created} +
); diff --git a/src/components/css/Github.css b/src/components/css/Github.css index 034044d..8173495 100644 --- a/src/components/css/Github.css +++ b/src/components/css/Github.css @@ -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;