From 4ea38d6249ffb2a146876bc3c7d4f79e6bbbe832 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Fri, 18 Nov 2022 16:28:18 -0500 Subject: Upgrade dependencies: Gatsby 5.0.1 --- src/pages/index.tsx | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'src/pages/index.tsx') diff --git a/src/pages/index.tsx b/src/pages/index.tsx index a1f4f35..33b062b 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,11 +1,10 @@ import React from "react"; import styled from "styled-components"; import { StaticImage } from "gatsby-plugin-image"; -import SEO from "../components/SEO"; import "../styles/main.css"; -import { FaMastodon } from "react-icons/fa"; +import { FaGithub, FaMastodon } from "react-icons/fa"; -const TIMESTAMP = "1641237448"; +const TIMESTAMP = "1668805149"; const SHORT_CHARS = [ "0", "1", @@ -72,11 +71,13 @@ const SHORT_CHARS = [ ]; function toShort(valu: number): string { - return valu - .toString() - .match(/.{1,2}/g) - .map((s) => SHORT_CHARS[parseInt(s)]) - .join(""); + return ( + valu + .toString() + .match(/.{1,2}/g) + ?.map((s) => SHORT_CHARS[parseInt(s)]) + .join("") ?? "" + ); } function getTimestamp(seconds: number): string { @@ -188,7 +189,6 @@ const StyledContainer = styled.div` const IndexPage = (): React.ReactElement => { return (
-
-
@@ -244,7 +240,7 @@ const IndexPage = (): React.ReactElement => {
- ©2021 kjhoerr@https://submelon.dev/: + ©2022 kjhoerr@https://submelon.dev/: {getTimestamp(parseInt(TIMESTAMP))}
@@ -254,3 +250,4 @@ const IndexPage = (): React.ReactElement => { }; export default IndexPage; +export { Head } from "../components/SEO"; -- cgit