diff --git a/README.md b/README.md index 1e766b8..201d541 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # Wych + Source code + blog posts for my website, [wych.dev](https://wych.dev). diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index 5543678..7150c1e 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -19,11 +19,11 @@ const NotFound = () => (

{quote.split("\n").map((line, i) => ( - {'>'} {line} + {">"} {line} ))}

-
+
Stay Leave
diff --git a/src/app/page.tsx b/src/app/page.tsx index cdc28c3..b7b4640 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -26,7 +26,7 @@ export default function Home() { Elias Almqvist -

+ I am a{" "} { (± 2 MHz){" "} old human- founder, engineer, and hacker with a passion for CS, physics, and mathematics. -

-

+ + Currently working on{" "} - + ingenuity . Some of my projects are open-source (FOSS), and if you are interested, you can find them on my{" "} - + self-hosted git-server {" "} or{" "} - + GitHub . -

+
diff --git a/src/components/age.tsx b/src/components/age.tsx index 6147ead..6a8f419 100644 --- a/src/components/age.tsx +++ b/src/components/age.tsx @@ -5,12 +5,6 @@ import { useEffect, useState } from "react"; const hydrogenLineFrequency_Hz = 1420.405751768 * 10 ** 6; -function getAge() { - let birth = 1050019200; - let now = Math.floor(Date.now() / 1000); - return now - birth; -} - function secondsToHydrogenLineCycles(secs: number) { return secs * hydrogenLineFrequency_Hz; } @@ -108,18 +102,27 @@ const AgeHCyclesDisplay: React.FC = ({ className, precision = 2, }) => { - const [cycles, setCycles] = useState(0); + const [age, setAge] = useState(null); + + function getAge() { + let birth = 1050019200; + let now = Math.floor(Date.now() / 1000); + return now - birth; + } useEffect(() => { const interval = setInterval(() => { - setCycles(secondsToHydrogenLineCycles(getAge())); + setAge(getAge()); }, 400); - return () => clearInterval(interval); - }); + }, [getAge]); return ( - + ); }; diff --git a/src/components/ilink.tsx b/src/components/ilink.tsx index c9a8afc..858d3e9 100644 --- a/src/components/ilink.tsx +++ b/src/components/ilink.tsx @@ -1,5 +1,6 @@ import Link from "next/link"; import { Button } from "./ui/button"; +import { cn } from "@/lib/utils"; type ILinkProps = { href: string; @@ -15,7 +16,10 @@ const ILink: React.FC = ({ }) => { return ( -