-
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.
- Loading branch information
1 parent
917fd9b
commit 442ed66
Showing
31 changed files
with
3,725 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
|
Large diffs are not rendered by default.
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
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
@import url("https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"); | ||
|
||
.App { | ||
text-align: center; | ||
background-color: rgb(243, 242, 239); | ||
} | ||
|
||
.App-logo { | ||
|
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,28 @@ | ||
const { REACT_APP_TOKEN, REACT_APP_ME } = process.env; | ||
|
||
export const token = REACT_APP_TOKEN; | ||
export const me = REACT_APP_ME; | ||
|
||
export const postTimer = (x) => { | ||
const postedDateISO = x; | ||
const postedDate = new Date(postedDateISO).getTime(); | ||
const dateToday = new Date().getTime(); | ||
const milliseconds = Math.abs(dateToday - postedDate).toString(); | ||
|
||
const minutes = parseInt(milliseconds / 1000 / 60); | ||
const hours = parseInt(minutes / 60); | ||
const days = parseInt(hours / 24); | ||
const weeks = parseInt(days / 7); | ||
let date; | ||
|
||
if (weeks > 0) { | ||
date = `${weeks}w`; | ||
} else if (days > 0) { | ||
date = `${days}d`; | ||
} else if (days == 0 && hours >= 1) { | ||
date = `${hours}hr`; | ||
} else if (hours < 1) { | ||
date = `${minutes}min`; | ||
} | ||
return date; | ||
}; |
Oops, something went wrong.