add links page back, update header
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import React from "react"
|
||||
import Link from "next/link"
|
||||
|
||||
export default function CustomButton({
|
||||
to,
|
||||
label
|
||||
}: {
|
||||
to: string,
|
||||
label: string
|
||||
}) {
|
||||
return (
|
||||
<div>
|
||||
<Link href={to} target="_blank">
|
||||
<div className={`bg-black text-white text-lg font-semibold text-left p-2 w-52 rounded-lg`}>
|
||||
<div className="px-1 space-x-2">
|
||||
<div className="inline">
|
||||
{label}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
+22
-21
@@ -1,27 +1,28 @@
|
||||
"use client"
|
||||
import { useState, useEffect } from 'react';
|
||||
import Link from "next/link"
|
||||
|
||||
const quoteArray = [
|
||||
"It works on my machine",
|
||||
"Revert 'Revert 'Revert",
|
||||
"'fuck the tests'",
|
||||
"this is so cooked",
|
||||
"Professional Production Tester",
|
||||
"I break hearts to save lives.",
|
||||
"go bills",
|
||||
"josh allen is my goat",
|
||||
"lets go buffalo",
|
||||
"oorah",
|
||||
"how bout them bills??",
|
||||
"where else would you rather be..",
|
||||
"..than right here, right now?!"
|
||||
]
|
||||
export default function Header() {
|
||||
const quoteArray = [
|
||||
"It works on my machine",
|
||||
"Revert 'Revert 'Revert",
|
||||
"'fuck the tests'",
|
||||
"this is so cooked",
|
||||
"Professional Production Tester",
|
||||
"I break hearts to save lives.",
|
||||
"go bills",
|
||||
"josh allen is my goat",
|
||||
"lets go buffalo",
|
||||
"oorah",
|
||||
"how bout them bills??",
|
||||
"where else would you rather be..",
|
||||
"..than right here, right now?!"
|
||||
]
|
||||
const [ quote, setQuote ] = useState<string>(quoteArray[0])
|
||||
|
||||
async function getQuote(index: number) {
|
||||
return quoteArray[index]
|
||||
}
|
||||
|
||||
export default async function Header() {
|
||||
const quote = await getQuote(Math.floor(Math.random() * quoteArray.length))
|
||||
useEffect(() => {
|
||||
setQuote(quoteArray[Math.floor(Math.random() * quoteArray.length)]);
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="bg-zinc-900 p-4 flex justify-between">
|
||||
|
||||
Reference in New Issue
Block a user