dfghgfhplkjbv

src/components/AllJobs/AllJobs.js

Feb 22nd, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. import React, { Component } from 'react'
  2. import styles from './AllJobs.module.scss'
  3. import { Link } from 'gatsby'
  4.  
  5. const categories = [
  6. { id: 1, title: 'Experience level' },
  7. { id: 2, title: 'Experience level' },
  8. { id: 3, title: 'Experience level' },
  9. ]
  10.  
  11. class AllJobs extends Component {
  12. render() {
  13. const {
  14. jobs: { edges },
  15. jobTags,
  16. } = this.props
  17. console.log(edges)
  18. return (
  19. <div className={styles.globalContainer}>
  20. <div className={styles.container} />
  21. <div className={styles.innerContainer}>
  22. <div className={styles.categoriesBlock}>
  23. <div className={styles.categoriesInnerContainer}>
  24. <h1>Select job categories: </h1>
  25. <div className={styles.tags}>
  26. {jobTags.map(({ node: { id, title } }) => (
  27. <button className={styles.button} key={id}>
  28. {title}
  29. </button>
  30. ))}
  31. </div>
  32. <div className={styles.bottomLine}>
  33. {categories.map((item) => (
  34. <select className={styles.level} key={item.id}>
  35. <option value="0">{item.title}</option>
  36. </select>
  37. ))}
  38. <button className={styles.clear}>Clear filters</button>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. <div className={styles.jobsContainer}>
  44. <div className={styles.listContainer}>
  45. <div className={styles.listJobs}>
  46. {edges.map(({ node: { title, description, locationDescription, companyLogo } }) => (
  47. <Link to="/" key={title} className={styles.link}>
  48. <div className={styles.oneJob}>
  49. <span className={styles.left}>
  50. <img src={companyLogo.url} alt="" className={styles.companyLogo} />
  51. </span>
  52. <span className={styles.right}>
  53. <div className={styles.title}>{title}</div>
  54. <div className={styles.location}>{locationDescription}</div>
  55. <div className={styles.description}>
  56. {description.length >= 245 ? `${description.substring(0, 245)}...` : description}
  57. </div>
  58. </span>
  59. </div>
  60. </Link>
  61. ))}
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. )
  67. }
  68. }
  69.  
  70. export default AllJobs
Advertisement
Add Comment
Please, Sign In to add comment