From 505c18041bebf533ec63fed3790f54f5c6e1843b Mon Sep 17 00:00:00 2001
From: HampusM <hampus@hampusmat.com>
Date: Sat, 3 Jul 2021 17:45:18 +0200
Subject: Made a bunch of frontend stuff work

---
 packages/client/src/components/RepositoryTreeTree.vue | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'packages/client/src/components/RepositoryTreeTree.vue')

diff --git a/packages/client/src/components/RepositoryTreeTree.vue b/packages/client/src/components/RepositoryTreeTree.vue
index 23811f7..821251e 100644
--- a/packages/client/src/components/RepositoryTreeTree.vue
+++ b/packages/client/src/components/RepositoryTreeTree.vue
@@ -35,12 +35,12 @@
 					</div>
 				</td>
 				<td>
-					<a @click="routeToCommit(entry.last_commit.id, $event)" :href="`/${repository}/log/${entry.last_commit.id}`">
-						{{ entry.last_commit.message }}
+					<a @click="routeToCommit(entry.latest_commit.id, $event)" :href="`/${repository}/log/${entry.latest_commit.id}`">
+						{{ entry.latest_commit.message }}
 					</a>
 				</td>
 				<td>
-					{{ getPrettyLastUpdated(entry.last_commit.date) }}
+					{{ getPrettyLastUpdated(entry.latest_commit.date) }}
 				</td>
 			</tr>
 		</tbody>
@@ -76,7 +76,7 @@ export default {
 			this.$router.push(`/${this.repository}/log/${commit_id}`);
 		},
 		getPrettyLastUpdated(date) {
-			return formatDistance(new Date(date), new Date(), { addSuffix: true });
+			return formatDistance(new Date(date * 1000), new Date(), { addSuffix: true });
 		}
 	}
 };
-- 
cgit v1.2.3-18-g5258

