From 82f374cbe29330162e9b00155419c60936a17eb3 Mon Sep 17 00:00:00 2001 From: Milesq Date: Thu, 31 Dec 2020 17:29:26 +0100 Subject: [PATCH] fix(typo): acient -> ancient --- src/card.ts | 2 +- src/github_api_client.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/card.ts b/src/card.ts index f52ec37..3f0be8c 100644 --- a/src/card.ts +++ b/src/card.ts @@ -49,7 +49,7 @@ export class Card { trophyList.push( new MultipleLangTrophy(userInfo.languageCount), new LongTimeAccountTrophy(userInfo.durationYear), - new AncientAccountTrophy(userInfo.acientAccount), + new AncientAccountTrophy(userInfo.ancientAccount), new Joined2020Trophy(userInfo.joined2020), new AllSuperRankTrophy(isAllSRank), ); diff --git a/src/github_api_client.ts b/src/github_api_client.ts index 7cde852..1200cdc 100644 --- a/src/github_api_client.ts +++ b/src/github_api_client.ts @@ -9,7 +9,7 @@ export class UserInfo { public totalRepositories: number, public languageCount: number, public durationYear: number, - public acientAccount: number, + public ancientAccount: number, public joined2020: number, ) { } @@ -92,7 +92,7 @@ export class GithubAPIClient { const durationTime = new Date().getTime() - new Date(userData.createdAt).getTime(); const durationYear = new Date(durationTime).getUTCFullYear() - 1970; - const acientAccount = new Date(userData.createdAt).getFullYear() <= 2010 + const ancientAccount = new Date(userData.createdAt).getFullYear() <= 2010 ? 1 : 0; const joined2020 = new Date(userData.createdAt).getFullYear() == 2020 @@ -107,7 +107,7 @@ export class GithubAPIClient { userData.repositories.totalCount, languages.size, durationYear, - acientAccount, + ancientAccount, joined2020 ); return userInfo;