Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
chore: updated contact us and careers page
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan-deriv committed Mar 1, 2024
1 parent 3f9f157 commit 7596c09
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 60 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import styled from 'styled-components'
import PropTypes from 'prop-types'
import { Carousel, CarouselProps, Header, Text } from 'components/elements'
import device from 'themes/device'
import { SectionContainer, Flex } from 'components/containers'
Expand Down Expand Up @@ -85,7 +84,14 @@ const StyledImg = styled.img`
height: 100%;
`

const EmployeeSlide = ({ quote, img_path, img_alt, name }) => {
type EmployeeSlideProps = {
img_alt: string
img_path: string
name: string
quote: string
}

const EmployeeSlide = ({ quote, img_path, img_alt, name }: EmployeeSlideProps) => {
return (
<Flex ai="center" height="unset">
<EmployeeCard>
Expand All @@ -106,14 +112,6 @@ const EmployeeSlide = ({ quote, img_path, img_alt, name }) => {
)
}

EmployeeSlide.propTypes = {
img_alt: PropTypes.string,
img_path: PropTypes.string,
name: PropTypes.string,
quote: PropTypes.string,
title: PropTypes.string,
}

const ahmad = {
name: 'Ahmad Aizuddin, Disaster Recovery Analyst',
img_alt: 'Ahmad Aizuddin Disaster Recovery Analyst at Deriv',
Expand Down
4 changes: 2 additions & 2 deletions themes/gatsby-theme-deriv/src/pages/careers/_hero.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useContext } from 'react'
import styled from 'styled-components'
import { StaticImage } from 'gatsby-plugin-image'
import Container from './_layout-components/_career_container'
Expand Down Expand Up @@ -75,7 +75,7 @@ const StyledLinkButton = styled(LinkButton)`
`

const Hero = () => {
const { has_mounted } = React.useContext(LocationContext)
const { has_mounted } = useContext(LocationContext)

return (
<BackgroundImageWrapper dark_background>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import styled from 'styled-components'
import PropTypes from 'prop-types'
import { Header } from 'components/elements'
import device from 'themes/device'
import { Container, SectionContainer, Desktop, Mobile } from 'components/containers'
Expand Down Expand Up @@ -120,19 +119,6 @@ const MobileSingleImage = styled.div`
}
`

const ImageSlide = ({ img_path, img_alt }) => {
return (
<ImageWrapper>
<img src={img_path} alt={img_alt} loading="lazy" />
</ImageWrapper>
)
}

ImageSlide.propTypes = {
img_alt: PropTypes.string,
img_path: PropTypes.string,
}

const LifeAtDerivCarousel = () => {
return (
<>
Expand Down
37 changes: 18 additions & 19 deletions themes/gatsby-theme-deriv/src/pages/careers/_our-hiring-process.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'
import PropTypes from 'prop-types'
import React, { CSSProperties } from 'react'
import styled, { css } from 'styled-components'
import { zoho_url } from 'common/constants'
// SVG
Expand All @@ -14,7 +13,7 @@ import { Text, Header, LinkText } from 'components/elements'
import { LinkButton } from 'components/form'
import device from 'themes/device'
import TipIcon from 'images/svg/careers/career-tip.svg'
import useRegion from 'components/hooks/use-region'
import useBuildVariant from 'features/hooks/use-build-variant'

const StyledSectionContainer = styled(SectionContainer)`
padding: 8rem 0 5rem 0;
Expand Down Expand Up @@ -110,7 +109,13 @@ const StyledContainer = styled(Container)`
align-items: center;
`

const TipsCard = ({ content, right, style }) => (
type TipsCardProps = {
content: string
right?: boolean
style: CSSProperties
}

const TipsCard = ({ content, right, style }: TipsCardProps) => (
<StyledTipsCard direction="column" right={right} style={style}>
<Flex direction="row" mb="1.3rem" jc="flex-start">
<TipsRounded src={TipIcon} alt="career1" />
Expand Down Expand Up @@ -148,7 +153,13 @@ const ProcessWrapper = styled(Flex)`
}
`

const Process = ({ title, description, style }) => (
type ProcessProps = {
description: string,
style: CSSProperties,
title: string,
}

const Process = ({ title, description, style }: ProcessProps) => (
<ProcessWrapper direction="column" style={style}>
<SecondaryHeader as="h2" type="page-title">
{title}
Expand Down Expand Up @@ -294,7 +305,7 @@ const StyledLinkText = styled(LinkText)`
`

const OurHiringProcess = () => {
const { is_eu } = useRegion()
const {region} = useBuildVariant();
return (
<StyledSectionContainer>
<Container direction="column">
Expand Down Expand Up @@ -401,7 +412,7 @@ const OurHiringProcess = () => {
See all jobs
</StyledLinkButton>
</StyledContainer>
{is_eu && (
{region === "eu" && (
<Container>
<StyledText mt="8rem">
Please read this
Expand All @@ -422,16 +433,4 @@ const OurHiringProcess = () => {
)
}

Process.propTypes = {
description: PropTypes.string,
style: PropTypes.object,
title: PropTypes.string,
}

TipsCard.propTypes = {
content: PropTypes.string,
right: PropTypes.bool,
style: PropTypes.object,
}

export default OurHiringProcess
25 changes: 14 additions & 11 deletions themes/gatsby-theme-deriv/src/pages/careers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ const meta_attributes = {
og_description: 'Join our incredible team where your growth is just as important as ours.',
}

const Careers = () => (
<Layout type="careers">
<Hero />
<WhoWeLookFor />
<JoinYourTeam />
<OurValues />
<LifeAtDerivCarousel />
<EmployeeTestimonial />
<OurHiringProcess />
</Layout>
)
const Careers = ({pageContext}: TGatsbyHead) => {
const {region} = pageContext
return(
<Layout region={region} type="careers">
<Hero />
<WhoWeLookFor />
<JoinYourTeam />
<OurValues />
<LifeAtDerivCarousel />
<EmployeeTestimonial />
<OurHiringProcess />
</Layout>
)
}

export default WithIntl()(Careers)

Expand Down
7 changes: 5 additions & 2 deletions themes/gatsby-theme-deriv/src/pages/contact_us/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ const StyledText = styled(Text)`
}
`

const ContactUs = ({ data }: TContactUs) => {
type ContactUsProps = TContactUs & TGatsbyHead

const ContactUs = ({ data, pageContext }: ContactUsProps) => {
const {region} = pageContext
const { hero, support_section, our_offices, office_address, business_partnership } =
data?.strapiContactUs || {}

Expand All @@ -44,7 +47,7 @@ const ContactUs = ({ data }: TContactUs) => {
useOpenLiveChat(true)

return (
<Layout>
<Layout region={region}>
<SectionContainer tablet={{ p: '40px 0' }}>
<HeroWrapper fd="column">
<Header align="center" as="h1" type="display-title">
Expand Down
5 changes: 3 additions & 2 deletions themes/gatsby-theme-deriv/src/pages/why-choose-us/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ const ResponsiveHeader = styled(StyledHeader)`
}
`

const WhyChooseUs = () => {
const WhyChooseUs = ({pageContext}: TGatsbyHead) => {
const {region} = pageContext
const { is_latam, is_africa } = useRegion()
const handleSignup = useHandleSignup()

return (
<Layout>
<Layout region={region}>
<Section>
<GridContainer>
<ResponsiveHeader as="h1" type="display-title" align="center">
Expand Down

0 comments on commit 7596c09

Please sign in to comment.