-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-pages-games-changeincharge-js-f22afdcd8452e16fc683.js
2 lines (2 loc) · 2.77 KB
/
component---src-pages-games-changeincharge-js-f22afdcd8452e16fc683.js
1
2
"use strict";(self.webpackChunkgatsby_starter_hello_world=self.webpackChunkgatsby_starter_hello_world||[]).push([[595],{8350:function(e,a,t){t.d(a,{Z:function(){return r}});var l=t(3723),n=t(7294);function m(e){var a=(0,n.useState)(0),t=a[0],m=a[1];return(0,n.useEffect)((function(){var a=setTimeout((function(){m((function(a){return(a+1)%e.images.length}))}),5e3);return function(){clearTimeout(a)}}),[t]),(0,n.useEffect)((function(){document.getElementById("carousel").scrollTo({left:document.getElementById(e.images[t].img.id).scrollHeight*t,top:0,behavior:"smooth"})}),[t]),n.createElement("section",{className:"slideshow-module--Slideshow--v-Ved"},n.createElement(l.G,{image:e.images[t].img.childImageSharp.gatsbyImageData,alt:e.images[t].alt,className:"slideshow-module--MainContainer--zL-sG",imgStyle:{objectFit:"scale-down"}}),n.createElement("div",{className:"slideshow-module--CarouselContainer--+iqAk"},n.createElement("ul",{className:"slideshow-module--Carousel--ZOVmB",id:"carousel"},e.images.map((function(e,a){return n.createElement("li",{key:e.img.id,id:e.img.id,onClick:function(){return m(a)}},n.createElement(l.G,{image:e.img.childImageSharp.gatsbyImageData,alt:e.alt,className:a===t?"slideshow-module--ContainerHighlight--fvuzw":"slideshow-module--Container--t1k-r",imgStyle:{objectFit:"scale-down"}}))})))))}function r(e){return n.createElement("div",null,n.createElement("header",null,n.createElement(l.G,{className:"gamedetail-module--Banner--GItFh",image:e.game.banner.childImageSharp.gatsbyImageData})),n.createElement("main",{className:"gamedetail-module--Body--Eaedq"},n.createElement("div",null,n.createElement("header",{className:"gamedetail-module--Title--9J6ij"},n.createElement("h1",null,e.game.title),n.createElement("p",null,e.game.sentence)),n.createElement("section",{className:"gamedetail-module--Description--lgabr"},n.createElement("p",null,e.game.paragraph)),n.createElement("section",{className:"gamedetail-module--Screenshots--h5OFm",style:{backgroundColor:e.game.mainColor}},n.createElement(m,{images:e.game.screenshots}))),n.createElement("aside",{className:"gamedetail-module--Team--T1HTN",style:{backgroundColor:e.game.sidebarColor}},n.createElement("div",null,n.createElement("h2",null,e.game.team),n.createElement("ul",null,e.game.members.map((function(e){return n.createElement("li",{key:e.name},n.createElement("h3",null,e.name),n.createElement("p",null,e.role))})))))))}},1231:function(e,a,t){t.r(a),t.d(a,{Head:function(){return c},default:function(){return i}});var l=t(7294),n=t(8350),m=t(7737),r=t(8461);function i(e){var a=e.data.changeinchargeJson;return l.createElement(m.Z,null,l.createElement(n.Z,{game:a}))}function c(){return l.createElement(r.H,{title:"Change in Charge"})}}}]);
//# sourceMappingURL=component---src-pages-games-changeincharge-js-f22afdcd8452e16fc683.js.map