Advertisement
dfghgfhplkjbv

src/templates/Podcatsts.js

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