aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorKevin J Hoerr <kjhoerr@protonmail.com>2021-09-09 13:43:45 -0400
committerKevin J Hoerr <kjhoerr@protonmail.com>2021-09-09 13:43:45 -0400
commita1268eb07b9c16f05c16a95891260b03119e53c2 (patch)
tree4c543006401776cfe300b0abb84f13411b5075ce /src
parent0615a7c6eed7593c4551f697d668c3b91013cfa6 (diff)
downloadsubmelon.dev-a1268eb07b9c16f05c16a95891260b03119e53c2.tar.gz
submelon.dev-a1268eb07b9c16f05c16a95891260b03119e53c2.tar.bz2
submelon.dev-a1268eb07b9c16f05c16a95891260b03119e53c2.zip
Eslint, Prettier, etc
Diffstat (limited to 'src')
-rw-r--r--src/components/SEO.tsx14
-rw-r--r--src/pages/404.tsx2
-rw-r--r--src/pages/index.tsx30
3 files changed, 25 insertions, 21 deletions
diff --git a/src/components/SEO.tsx b/src/components/SEO.tsx
index 26018e9..e3683df 100644
--- a/src/components/SEO.tsx
+++ b/src/components/SEO.tsx
@@ -3,7 +3,19 @@ import PropTypes from "prop-types";
import { Helmet } from "react-helmet";
import { useStaticQuery, graphql } from "gatsby";
-function SEO({ description, lang, meta, title }) {
+interface MetaProps {
+ name: string;
+ content: string;
+}
+
+interface SEOProps {
+ description: string;
+ lang: string;
+ meta: MetaProps[];
+ title: string;
+}
+
+function SEO({ description, lang, meta, title }: SEOProps): React.ReactElement {
const { site } = useStaticQuery(
graphql`
query {
diff --git a/src/pages/404.tsx b/src/pages/404.tsx
index fd99104..0f6164c 100644
--- a/src/pages/404.tsx
+++ b/src/pages/404.tsx
@@ -25,7 +25,7 @@ const codeStyles = {
};
// markup
-const NotFoundPage = () => {
+const NotFoundPage = (): React.ReactElement => {
return (
<main style={pageStyles}>
<title>Not found</title>
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 (
<main>
<SEO title="Kevin J Hoerr <kjhoerr@submelon.tech>" />
@@ -212,7 +204,7 @@ const IndexPage = () => {
<div id="tagline">Hello!</div>
<div id="info">
<p>
- I'm a computer science and math graduate from Millersville
+ I&apos;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.