generated from ita-social-projects/DevTemplate
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add links for vacancies` description
add redirecting to gmail
- Loading branch information
Showing
8 changed files
with
102 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const EMAIL = '[email protected]'; | ||
|
||
export default EMAIL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 46 additions & 33 deletions
79
src/features/AboutUsPage/Vacancies/Vacancy/VacancyModal/VacancyModal.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,75 @@ | ||
import './VacancyModal.styles.scss'; | ||
import { Button, Modal } from "antd"; | ||
|
||
import CancelBtn from '@images/utils/Cancel_btn.svg'; | ||
|
||
import React from 'react'; | ||
import { SCREEN_SIZES } from '@/app/common/constants/screen-sizes.constants'; | ||
import EMAIL from '@constants/email.constants'; | ||
|
||
import { Button, Modal } from 'antd'; | ||
|
||
import { SCREEN_SIZES } from '@/app/common/constants/screen-sizes.constants'; | ||
|
||
interface Props { | ||
isOpen: boolean, | ||
setOpen: React.Dispatch<React.SetStateAction<boolean>>, | ||
job : Job | ||
} | ||
|
||
const VacancyModal = ({isOpen, setOpen, job}: Props) => { | ||
|
||
const VacancyModal = ({ isOpen, setOpen, job }: Props) => { | ||
const descriptionLines = job.description.split('\n').map((line, index) => ( | ||
<React.Fragment key={index}> | ||
{line} | ||
<div dangerouslySetInnerHTML={{ __html: line }} /> | ||
<br /> | ||
</React.Fragment> | ||
)); | ||
|
||
const getWidth = () => { | ||
if(window.innerWidth > SCREEN_SIZES.tablet) { | ||
return 830 | ||
if (window.innerWidth > SCREEN_SIZES.tablet) { | ||
return 830; | ||
} | ||
if(window.innerWidth > SCREEN_SIZES.smallTablet){ | ||
return 600 | ||
if (window.innerWidth > SCREEN_SIZES.smallTablet) { | ||
return 600; | ||
} | ||
if(window.innerWidth > SCREEN_SIZES.phone){ | ||
return 400 | ||
if (window.innerWidth > SCREEN_SIZES.phone) { | ||
return 400; | ||
} | ||
if(window.innerWidth > SCREEN_SIZES.smallPhone){ | ||
return 310 | ||
if (window.innerWidth > SCREEN_SIZES.smallPhone) { | ||
return 310; | ||
} | ||
return 270 | ||
} | ||
return 270; | ||
}; | ||
|
||
return( | ||
return ( | ||
<Modal | ||
open = {isOpen} | ||
onCancel={ ()=>{setOpen(false)}} | ||
open={isOpen} | ||
onCancel={() => { | ||
setOpen(false); | ||
}} | ||
closeIcon={<CancelBtn />} | ||
className="vacancyModal" | ||
footer = {null} | ||
footer={null} | ||
width={getWidth()} | ||
> | ||
|
||
<div className='vacancyModalContainer'> | ||
<div className='textContainer'> | ||
<h2>{job.title}</h2> | ||
<h3>{job.salary}</h3> | ||
<p>{descriptionLines}</p> | ||
</div> | ||
<div className='buttonContainer'> | ||
<Button className='vacancyModalButton streetcode-custom-button'>Відгукнутися</Button> | ||
</div> | ||
> | ||
|
||
<div className="vacancyModalContainer"> | ||
<div className="textContainer"> | ||
<h2>{job.title}</h2> | ||
<h3>{job.salary}</h3> | ||
<p>{descriptionLines}</p> | ||
</div> | ||
<div className="buttonContainer"> | ||
<Button | ||
className="vacancyModalButton streetcode-custom-button" | ||
onClick={(e) => { | ||
window.location.href = `https://mail.google.com/mail/?view=cm&fs=1&to=${EMAIL}`; | ||
e.preventDefault(); | ||
}} | ||
> | ||
Відгукнутися | ||
</Button> | ||
</div> | ||
</div> | ||
</Modal> | ||
); | ||
} | ||
export default VacancyModal; | ||
); | ||
}; | ||
export default VacancyModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,14 @@ import TikTok from '@images/contact-us/TikTok.webp'; | |
import Twitter from '@images/contact-us/Twitter.webp'; | ||
import YouTube from '@images/contact-us/Youtube.webp'; | ||
|
||
const EMAIL = '[email protected]'; | ||
import EMAIL from '@constants/email.constants'; | ||
|
||
const ContactBlock = () => ( | ||
<div className="contactBlock"> | ||
<img className="contactLogo" src={Logo} alt="" /> | ||
<div className="contactCover"> | ||
<div className="emailBlock"> | ||
<a href={`mailto:${EMAIL}`} className="emailLink"> | ||
<a href={`https://mail.google.com/mail/?view=cm&fs=1&to=${EMAIL}`} className="emailLink"> | ||
<img className="icon" src={Email} alt="email-logo" /> | ||
</a> | ||
<span className="email"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const EMAIL = '[email protected]'; | ||
import EMAIL from '@constants/email.constants'; | ||
|
||
const SectionFifth = () => ( | ||
<section id="fifth" data-block-id="fifth"> | ||
|
@@ -105,7 +105,7 @@ const SectionFifth = () => ( | |
</ul> | ||
Щоб звернутися до Організації з приводу використання файлів cookie, відправте повідомлення | ||
електронною поштою на адресу | ||
<a className="link" href={`mailto:${EMAIL}`}>{EMAIL}</a> | ||
<a className="link" href={`https://mail.google.com/mail/?view=cm&fs=1&to=${EMAIL}`}>{EMAIL}</a> | ||
. | ||
<br /> | ||
Якщо користувач не включає використання файлів cookie або навмисно видаляє всі файли cookie | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const EMAIL = '[email protected]'; | ||
import EMAIL from '@constants/email.constants'; | ||
|
||
const SectionSeventh = () => ( | ||
<section> | ||
|
@@ -12,7 +12,7 @@ const SectionSeventh = () => ( | |
<br /> | ||
З питань щодо політики конфіденційності (в т.ч. видалення персональних даних), Користувач може | ||
зв'язатися з нами, використовуючи e—mail: | ||
<a className="link" href={`mailto:${EMAIL}`}> {EMAIL}</a> | ||
<a className="link" href={`https://mail.google.com/mail/?view=cm&fs=1&to=${EMAIL}`}>{EMAIL}</a> | ||
. | ||
</div> | ||
</section> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters