From bae21571e91dad2b8791ec80125c412659faa30f Mon Sep 17 00:00:00 2001 From: Jack Merrill Date: Wed, 31 Mar 2021 01:16:28 -0500 Subject: [PATCH] fix(again): Fonts issue? --- pages/index.tsx | 93 +++++++++++++++++++++++++--------------------- postcss.config.js | 22 +++-------- tailwind.config.js | 1 + 3 files changed, 56 insertions(+), 60 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index 1bac773..e37bdcd 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,50 +1,57 @@ import Link from 'next/link' +import { useEffect, useState } from 'react' import Navbar from '../components/Navbar' -function GetTimeString() { - const hours = new Date().getHours() +const IndexPage = () => { + const [timeString, setTimeString] = useState('Morning') - if (hours < 12) { - return 'Morning' - } else if (hours >= 12 && hours <= 17) { - return 'Afternoon' - } else if (hours >= 17 && hours <= 24) { - return 'Evening' - } + useEffect(() => { + const hours = new Date().getHours() + + console.log(new Date()) + + if (hours < 12) { + setTimeString('Morning') + } else if (hours >= 12 && hours <= 17) { + setTimeString('Afternoon') + } else if (hours >= 17 && hours <= 24) { + setTimeString('Evening') + } + }) + + return ( +
+
+ + +
+
+

Good {timeString}! I'm Jack Merrill.

+
+
+

A Graphic and UI/UX Designer and Fullstack Developer from Chicago.

+
+ +
+
+
+ ) } -const IndexPage = () => ( -
-
- - -
-
-

Good {GetTimeString()}! I'm Jack Merrill.

-
-
-

A Graphic and UI/UX Designer and Fullstack Developer from Chicago.

-
- -
-
-
-) - export default IndexPage diff --git a/postcss.config.js b/postcss.config.js index 6fcf2ad..33ad091 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,18 +1,6 @@ module.exports = { - plugins: [ - 'tailwindcss', - process.env.NODE_ENV === 'production' - ? [ - '@fullhuman/postcss-purgecss', - { - content: [ - './pages/**/*.{js,jsx,ts,tsx}', - './components/**/*.{js,jsx,ts,tsx}', - ], - defaultExtractor: (content) => content.match(/[\w-/:]+(?