@@ -5,10 +5,10 @@ import { useTranslation } from "gatsby-plugin-react-i18next"
5
5
import { FaGithub } from "react-icons/fa"
6
6
7
7
import ButtonLink from "../components/Buttons/ButtonLink"
8
- import PageHero from "../components/PageHero"
9
8
import PageMetadata from "../components/PageMetadata"
10
9
import Translation from "../components/Translation"
11
10
import FeedbackCard from "../components/FeedbackCard"
11
+ import HubHero from "../components/Hero/HubHero"
12
12
import QuizWidget from "../components/Quiz/QuizWidget"
13
13
import QuizzesList from "../components/Quiz/QuizzesList"
14
14
import QuizzesModal from "../components/Quiz/QuizzesModal"
@@ -65,14 +65,6 @@ const QuizzesHubPage = ({ data }: PageProps<Queries.QuizzesHubPageQuery>) => {
65
65
66
66
const { t } = useTranslation ( )
67
67
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
-
76
68
const contextState = {
77
69
status : quizStatus ,
78
70
quizKey : currentQuiz ,
@@ -90,9 +82,13 @@ const QuizzesHubPage = ({ data }: PageProps<Queries.QuizzesHubPageQuery>) => {
90
82
title = { t ( "quizzes-title" ) }
91
83
description = { t ( "quizzes-subtitle" ) }
92
84
/>
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
+ />
96
92
97
93
< QuizzesHubContext . Provider value = { contextState } >
98
94
< QuizzesModal isOpen = { isOpen } onClose = { onClose } >
@@ -223,14 +219,9 @@ export const query = graphql`
223
219
}
224
220
}
225
221
}
226
- doge : file(relativePath: { eq: "doge-computer .png" }) {
222
+ heroImage : file(relativePath: { eq: "heroes/quizzes-hub-hero .png" }) {
227
223
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)
234
225
}
235
226
}
236
227
}
0 commit comments