randomize greeting and remove api/hello
This commit is contained in:
parent
51916e10c8
commit
a35a91b710
2 changed files with 11 additions and 15 deletions
|
@ -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<Data>
|
|
||||||
) {
|
|
||||||
res.status(200).json({ name: 'John Doe' })
|
|
||||||
}
|
|
|
@ -6,6 +6,12 @@ import Lanyard from "@/components/Lanyard"
|
||||||
import Head from "next/head"
|
import Head from "next/head"
|
||||||
import Link from "@/components/Link";
|
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 = () => {
|
const IndexPage = () => {
|
||||||
let Index = (
|
let Index = (
|
||||||
<main id={index.layout}>
|
<main id={index.layout}>
|
||||||
|
@ -14,9 +20,12 @@ const IndexPage = () => {
|
||||||
</Head>
|
</Head>
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
<section id={index.main}>
|
<section id={index.main}>
|
||||||
<h1>hi there!</h1>
|
<h1>
|
||||||
|
<noscript>Hey there!</noscript>
|
||||||
|
{randomHello()}
|
||||||
|
</h1>
|
||||||
<p>
|
<p>
|
||||||
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.
|
||||||
</p>
|
</p>
|
||||||
{/* <p>
|
{/* <p>
|
||||||
you might know me from Projects like <Link />
|
you might know me from Projects like <Link />
|
||||||
|
|
Loading…
Add table
Reference in a new issue