import { getUsers } from "@/drizzle/db";
import Image from "next/image";
import avatar from "../public/leverpostej.jpg";
import SignIn from "@/components/SignIn";

export default async function Home() {
  const users = await getUsers();
  console.log(users);
  const name = users[0] ? users[0].name : "guest";
  return (
    <main className="bg-black text-white">
      <h1>Hello {name}!</h1>
      <Image
        src={avatar}
        width={100}
        height={100}
        alt={`Picture of ${users[0].name}`}
      />
      <SignIn />
    </main>
  );
}
