From a35a91b7107a5cf7cf864ace4656bac77be0c125 Mon Sep 17 00:00:00 2001 From: Joshua Date: Sat, 27 May 2023 06:03:32 +0200 Subject: [PATCH] randomize greeting and remove api/hello --- src/pages/api/hello.ts | 13 ------------- src/pages/index.tsx | 13 +++++++++++-- 2 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 src/pages/api/hello.ts diff --git a/src/pages/api/hello.ts b/src/pages/api/hello.ts deleted file mode 100644 index f8bcc7e..0000000 --- a/src/pages/api/hello.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Next.js API route support: https://nextjs.org/docs/api-routes/introduction -import type { NextApiRequest, NextApiResponse } from 'next' - -type Data = { - name: string -} - -export default function handler( - req: NextApiRequest, - res: NextApiResponse -) { - res.status(200).json({ name: 'John Doe' }) -} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index ae1d0e8..5b81c61 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -6,6 +6,12 @@ import Lanyard from "@/components/Lanyard" import Head from "next/head" import Link from "@/components/Link"; +const Hello = ["Ahoy!", "Ahoy there!", "Hey there!", "Howdy howdy!", "Howdy, friend!", "Howdy!", "Hey!", "Hey there!", "Hi!", "Hello!", "Hello there!", "Hi there!"]; +function randomHello() { + return Hello[Math.floor(Math.random() * Hello.length)]; +} + + const IndexPage = () => { let Index = (
@@ -14,9 +20,12 @@ const IndexPage = () => {
-

hi there!

+

+ + {randomHello()} +

- my name's lio. i'm a 21y/o software engineer and student from germany. + my name's lio. i'm a 21y/o software dev student and ui designer from germany.

{/*

you might know me from Projects like