import { PageProps } from "$fresh/server.ts";
import { Head } from "$fresh/runtime.ts";
import StockList from "../../islands/StockList.tsx";


export default function Pages(props: PageProps) {
  return <>
    <Head>
        <title>Stock: {props.params.name}</title>
    </Head>
    <div class="px-4 py-8 mx-auto bg-[#86efac]">
      <div class="max-w-screen-md mx-auto flex flex-col items-center justify-center">
          <img
            class="my-6"
            src="/stockgraph.svg"
            width="128"
            height="128"
            alt="stock graph"
          />
        <h1 class="text-4xl">{props.params.name}</h1>
        <StockList pageName={props.params.name}></StockList>
      </div>
    </div>
  </>
}
