You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ExpandedCard.jsx 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. import React, { useContext, useEffect } from 'react';
  2. import PropTypes from 'prop-types';
  3. import TriangleButton from '../shared/TriangleButton';
  4. import { useNavigate } from 'react-router-dom';
  5. import net from './../../assets/icons/net.svg';
  6. import { m } from 'framer-motion';
  7. import useClickOutside from '../../hooks/useClickOutside';
  8. import { UIContext } from '../../context';
  9. const _data = {
  10. requirements: [
  11. 'Good software development fundamentals and knowledge of .NET architecture concepts & patterns',
  12. 'Good knowledge of software design patterns',
  13. 'Good knowledge of databases and database design',
  14. 'Experience in working with microservices is a big plus',
  15. 'The ability to work in a big team but also to work independently',
  16. 'Excellent communication skills',
  17. ],
  18. key: [
  19. 'Working as a full-stack developer on various project and products',
  20. 'Working with 3rd-party APIs',
  21. 'Working on different integration scenarios',
  22. 'Setting up project structure and architecture',
  23. 'Being involved in full project development, from writing a specification to deploying a finished product',
  24. ],
  25. offer: [
  26. 'Full Remote position',
  27. 'A fast-growth company with stable projects and strong international clients',
  28. 'Opportunity to work in teams with experienced engineers',
  29. 'Competitive employment conditions',
  30. 'An environment that will make you feel good about your job',
  31. 'Challenging and diverse projects',
  32. 'Support in your personal and professional growth',
  33. 'Flexible working hours',
  34. 'Private health insurance',
  35. ],
  36. };
  37. const _card = {
  38. role: '.Net Developer',
  39. shortDetails:
  40. 'Team Diligent is constantly growing! We are looking for a team player that will work with experienced engineers. If technology is your passion and you are ready to move the boundaries of your knowledge every day, then, Diligent is the right place for you. If you are not from Niš, we are offering a full remote position.',
  41. };
  42. const ExpandedCard = ({ card, setExpanded, setExpandedCard }) => {
  43. const linkTo = useNavigate();
  44. const {uiContext, setUiContext} = useContext(UIContext);
  45. useEffect(() => {
  46. console.log(card);
  47. }, [])
  48. function handleContext(id) {
  49. setUiContext({
  50. ...uiContext,
  51. tab: id,
  52. });
  53. }
  54. return (
  55. <div
  56. className={
  57. 'dark:text-white card-no-hover w-full h-fit shadow-md rounded-md px-12 lg:px-32 py-12 lg:py-16'
  58. }
  59. >
  60. {card.templateFlag === 1 && (
  61. <div className="flex flex-col items-start justify-center text-left">
  62. <div className="flex flex-row items-center justify-start">
  63. <div className="mr-4 lg:hidden">
  64. <TriangleButton
  65. onClick={() => {
  66. setExpanded(false);
  67. setExpandedCard({});
  68. }}
  69. direction={'left'}
  70. />
  71. </div>
  72. <div className="hidden lg:block absolute top-20 left-12">
  73. <TriangleButton
  74. onClick={() => {
  75. setExpanded(false);
  76. setExpandedCard({});
  77. }}
  78. direction={'left'}
  79. />
  80. </div>
  81. <img
  82. src={net}
  83. className="ml-auto mr-auto block w-[70px] bg-baby-blue text-dark-gray"
  84. />
  85. <h3 className="ml-6 w-full font-semibold text-2xl">{card.role}</h3>
  86. </div>
  87. <p className="mt-6 text-sm">{card.extended.shortDetails}</p>
  88. <h4 className="mt-6 font-semibold text-lg">Key Responsibilities:</h4>
  89. <ul>
  90. {_data.key.map((item, index) => (
  91. <li className="list-disc ml-6" key={index}>
  92. {item}
  93. </li>
  94. ))}
  95. </ul>
  96. <br />
  97. <h4 className="mt-6 font-semibold text-lg">Requirements:</h4>
  98. <ul>
  99. {_data.requirements.map((item, index) => (
  100. <li className="list-disc ml-6" key={index}>
  101. {item}
  102. </li>
  103. ))}
  104. </ul>
  105. <br />
  106. <h4 className="mt-6 font-semibold text-lg">What We Offer:</h4>
  107. <ul>
  108. {_data.offer.map((item, index) => (
  109. <li className="list-disc ml-6" key={index}>
  110. {item}
  111. </li>
  112. ))}
  113. </ul>
  114. <br />
  115. <div className="flex flex-row w-full items-center justify-end">
  116. <a
  117. href="/contact"
  118. className="btn btn_primary mt-8 transition-all hover:transition-all"
  119. onClick={()=> handleContext(card.id)}
  120. >
  121. Apply
  122. </a>
  123. </div>
  124. </div>
  125. )}
  126. {card.templateFlag === 2 && (
  127. <div className="flex flex-col items-start justify-center text-left">
  128. <div className="flex flex-row items-center justify-start">
  129. <div className="mr-4 lg:hidden">
  130. <TriangleButton
  131. onClick={() => {
  132. setExpanded(false);
  133. setExpandedCard({});
  134. }}
  135. direction={'left'}
  136. />
  137. </div>
  138. <div className="hidden lg:block absolute top-20 left-12">
  139. <TriangleButton
  140. onClick={() => {
  141. setExpanded(false);
  142. setExpandedCard({});
  143. }}
  144. direction={'left'}
  145. />
  146. </div>
  147. <img
  148. src={net}
  149. className="ml-auto mr-auto block w-[70px] bg-baby-blue text-dark-gray"
  150. />
  151. <h3 className="ml-6 w-full font-semibold text-2xl">{card.role}</h3>
  152. </div>
  153. <p className="mt-6 text-sm">{card.extended.paragraph}</p>
  154. <h4 className="mt-6 font-semibold text-lg">What We Offer:</h4>
  155. <ul>
  156. {card.extended.offer.map((item, index) => (
  157. <li className="list-disc ml-6" key={index}>
  158. {item}
  159. </li>
  160. ))}
  161. </ul>
  162. <br />
  163. <h4 className="mt-6 font-semibold text-lg">Requirements:</h4>
  164. <ul>
  165. {card.extended.requirements.map((item, index) => (
  166. <li className="list-disc ml-6" key={index}>
  167. {item}
  168. </li>
  169. ))}
  170. </ul>
  171. <br />
  172. <h4 className="mt-6 font-semibold text-lg">Our selection process has the following steps:</h4>
  173. <ul>
  174. {card.extended.selectionProcess.map((item, index) => (
  175. <li className="list-decimal ml-6" key={index}>
  176. {item}
  177. </li>
  178. ))}
  179. </ul>
  180. <br />
  181. <p className="mt-6 text-sm">{card.extended.conslusionParagraph}</p>
  182. <br/>
  183. <div className="flex flex-row w-full items-center justify-end">
  184. <a
  185. href="/contact"
  186. className="btn btn_primary mt-8 transition-all hover:transition-all"
  187. onClick={()=> handleContext(card.id)}
  188. >
  189. Apply
  190. </a>
  191. </div>
  192. </div>
  193. )}
  194. </div>
  195. );
  196. };
  197. ExpandedCard.propTypes = {};
  198. export default ExpandedCard;