Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercise 3- Add tickets page #6

Open
wants to merge 7 commits into
base: 02_make-footer-dynamic
Choose a base branch
from
47 changes: 47 additions & 0 deletions site/src/pages/tickets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React from "react";
import { useStaticQuery, graphql } from "gatsby";

import Layout from "../components/layout";
import SEO from "../components/seo";

const Ticket = ({ title }) => (
<div className="text-center ">
<h1 className="text-5xl font-extrabold text-blue-500 leading-9 tracking-tight">
Grab Your Ticket To {title}
</h1>
<br />
<div className="flex flex-col">
<div className="bg-gray-300 rounded-lg m-2 p-2 h-30 align-middle hover:bg-purple-200 ">
<h2>Full Pass</h2>
<p className="text-3xl">$20</p>
</div>
<div className="bg-gray-300 rounded-lg m-2 p-2 h-30 align-middle hover:bg-purple-200 ">
<div>
<h2>VIP Pass</h2>
<p className="text-3xl">$45</p>
</div>
</div>
</div>
</div>
);

function TicketsPage() {
const data = useStaticQuery(graphql`
query TicketsQuery {
site {
siteMetadata {
title
}
}
}
`);

return (
<Layout>
<SEO title="Tickets" keywords={[`Tickets`]} />
<Ticket title={data.site.siteMetadata.title} />
</Layout>
);
}

export default TicketsPage;