From a1268eb07b9c16f05c16a95891260b03119e53c2 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Thu, 9 Sep 2021 13:43:45 -0400 Subject: Eslint, Prettier, etc --- src/pages/index.tsx | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'src/pages/index.tsx') diff --git a/src/pages/index.tsx b/src/pages/index.tsx index bfd11c8..ee95918 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -81,23 +81,15 @@ function toShort(valu: number): string { function getTimestamp(seconds: number): string { const date = new Date(seconds * 1000); - const year = date.getUTCFullYear(); - const month = date.getUTCMonth(); - const day = date.getUTCDate(); - const hour = date.getUTCHours(); - const minute = date.getUTCMinutes(); - return ( - toShort(year) + - "." + - toShort(month) + - "." + - toShort(day) + - "." + - toShort(hour) + - "." + - toShort(minute) + - "-0" - ); + const dateArr = [ + date.getUTCFullYear(), + date.getUTCMonth(), + date.getUTCDate(), + date.getUTCHours(), + date.getUTCMinutes(), + ]; + + return dateArr.map(toShort).join(".") + "-0"; } // styles @@ -193,7 +185,7 @@ const StyledContainer = styled.div` `; // markup -const IndexPage = () => { +const IndexPage = (): React.ReactElement => { return (
@@ -212,7 +204,7 @@ const IndexPage = () => {
Hello!

- I'm a computer science and math graduate from Millersville + I'm a computer science and math graduate from Millersville University. I work as an IT consultant and specialize in development operations and systems validation for web applications. -- cgit