@@ -5,10 +5,10 @@ import { useTranslation } from "gatsby-plugin-react-i18next"
55import { FaGithub } from "react-icons/fa"
66
77import ButtonLink from "../components/Buttons/ButtonLink"
8- import PageHero from "../components/PageHero"
98import PageMetadata from "../components/PageMetadata"
109import Translation from "../components/Translation"
1110import FeedbackCard from "../components/FeedbackCard"
11+ import HubHero from "../components/Hero/HubHero"
1212import QuizWidget from "../components/Quiz/QuizWidget"
1313import QuizzesList from "../components/Quiz/QuizzesList"
1414import QuizzesModal from "../components/Quiz/QuizzesModal"
@@ -65,14 +65,6 @@ const QuizzesHubPage = ({ data }: PageProps<Queries.QuizzesHubPageQuery>) => {
6565
6666 const { t } = useTranslation ( )
6767
68- const heroContent = {
69- title : < Translation id = "quizzes-title" /> ,
70- header : < Translation id = "test-your-knowledge" /> ,
71- subtitle : < Translation id = "quizzes-subtitle" /> ,
72- image : getImage ( data . doge ) ! ,
73- alt : t ( "quizzes-title" ) ,
74- }
75-
7668 const contextState = {
7769 status : quizStatus ,
7870 quizKey : currentQuiz ,
@@ -90,9 +82,13 @@ const QuizzesHubPage = ({ data }: PageProps<Queries.QuizzesHubPageQuery>) => {
9082 title = { t ( "quizzes-title" ) }
9183 description = { t ( "quizzes-subtitle" ) }
9284 />
93- < Box w = "100%" bg = "layer2Gradient" pb = { 8 } >
94- < PageHero content = { heroContent } isReverse />
95- </ Box >
85+
86+ < HubHero
87+ heroImgSrc = { getImage ( data . heroImage ) ! }
88+ header = { t ( "test-your-knowledge" ) }
89+ title = { t ( "quizzes-title" ) }
90+ description = { t ( "quizzes-subtitle" ) }
91+ />
9692
9793 < QuizzesHubContext . Provider value = { contextState } >
9894 < QuizzesModal isOpen = { isOpen } onClose = { onClose } >
@@ -223,14 +219,9 @@ export const query = graphql`
223219 }
224220 }
225221 }
226- doge : file(relativePath: { eq: "doge-computer .png" }) {
222+ heroImage : file(relativePath: { eq: "heroes/quizzes-hub-hero .png" }) {
227223 childImageSharp {
228- gatsbyImageData(
229- width: 624
230- layout: CONSTRAINED
231- placeholder: BLURRED
232- quality: 100
233- )
224+ gatsbyImageData(layout: FULL_WIDTH, placeholder: BLURRED, quality: 100)
234225 }
235226 }
236227 }
0 commit comments