diff --git a/site/src/components/banner.js b/site/src/components/banner.js index 3442bf6..82a594a 100644 --- a/site/src/components/banner.js +++ b/site/src/components/banner.js @@ -1,12 +1,24 @@ -import React from "react" +import React from "react"; +import { useStaticQuery, graphql, Link } from "gatsby"; + export default function Banner() { + const data = useStaticQuery(graphql` + query BannerQuery { + site { + siteMetadata { + title + } + } + } + `); + return ( -
-
- - Tickets are on sale now for X Conf! - -
-
+ +
+
+ Tickets are on sale now for {data.site.siteMetadata.title}! +
+
+ ); } diff --git a/site/src/components/header.js b/site/src/components/header.js index e64301b..a02d46f 100644 --- a/site/src/components/header.js +++ b/site/src/components/header.js @@ -2,7 +2,7 @@ import { Link } from "gatsby"; import PropTypes from "prop-types"; import React, { useState } from "react"; import Logo from "../images/pencil-icon.png"; - +import Banner from "../components/banner"; function Header({ siteTitle }) { const [isExpanded, toggleExpansion] = useState(false); const NavLinks = [ @@ -12,6 +12,7 @@ function Header({ siteTitle }) { return (