dfghgfhplkjbv

src/templates/Interviews.js

Mar 1st, 2019
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. import React, { Component } from 'react'
  2. import { graphql } from 'gatsby'
  3. import Header from '../components/Header'
  4. import Footer from '../components/Footer'
  5. import InterviewsList from '../components/InterviewsList'
  6. import PageHelmet from 'src/components/PageHelmet'
  7. import Subscribe from '../components/Subscribe'
  8. import withLocale from 'src/components/withLocale'
  9.  
  10. class Interviews extends Component {
  11. render() {
  12. const {
  13. data: { interviews, subscribe },
  14. locale,
  15. changeLocale,
  16. } = this.props
  17.  
  18. return (
  19. <div>
  20. <PageHelmet title="Interviews" locale={locale} />
  21. <Header full={true} locale={locale} changeLocale={changeLocale} />
  22. <InterviewsList interviews={interviews} locale={locale} />
  23. <Subscribe style={{ marginTop: '70px' }} locale={locale} subscribe={subscribe} />
  24. <Footer locale={locale} />
  25. </div>
  26. )
  27. }
  28. }
  29.  
  30. export const query = graphql`
  31. query Interviews($locale: String!) {
  32. interviews: allDatoCmsInterview(filter: { locale: { eq: $locale } }) {
  33. edges {
  34. node {
  35. title
  36. description
  37. podcast {
  38. podcastTitle
  39. podcastGuest
  40. podcastCover {
  41. id
  42. fluid(maxWidth: 400, imgixParams: { fm: "jpg", auto: "compress, format" }) {
  43. ...GatsbyDatoCmsFluid
  44. }
  45. }
  46. duration
  47. podcast {
  48. url
  49. }
  50. }
  51. image {
  52. url
  53. fluid(maxWidth: 1240, imgixParams: { fm: "jpg", auto: "compress, format" }) {
  54. ...GatsbyDatoCmsFluid
  55. }
  56. }
  57. publishDate(formatString: "DD/MM/YYYY")
  58. slug
  59. }
  60. }
  61. }
  62. subscribe: file(relativePath: { eq: "subscribe-illustration.jpeg" }) {
  63. childImageSharp {
  64. fluid(maxWidth: 1440) {
  65. ...GatsbyImageSharpFluid
  66. }
  67. }
  68. }
  69. }
  70. `
  71.  
  72. export default withLocale(Interviews)
Add Comment
Please, Sign In to add comment