diff --git a/src/pages/who-we-are/_OurOffices.tsx b/src/pages/who-we-are/_OurOffices.tsx index 0a48d11eff2..4eecb38eff1 100644 --- a/src/pages/who-we-are/_OurOffices.tsx +++ b/src/pages/who-we-are/_OurOffices.tsx @@ -6,6 +6,7 @@ import { SectionContainer, CssGrid, Show, Flex } from 'components/containers' import { Header, Text, BackgroundImage } from 'components/elements' import device from 'themes/device' import { ReactComponent as Pin } from 'images/svg/who-we-are/pin.svg' +import { desktop_pins, mobile_pins, MapPinType } from './_data' const query = graphql` query { @@ -138,8 +139,7 @@ const StyledFlex = styled(Flex)` height: unset; ` -// eslint-disable-next-line react/prop-types -const MapPin = ({ top, left, title, link }) => { +const MapPin = ({ top, left, title, link }: MapPinType) => { const [is_pin_show, setPinShow] = React.useState(false) return ( { - - - - - - - - - - - - - + {desktop_pins.map((pin) => ( + + ))} - - - - - - - - - - - - - + {mobile_pins.map((pin) => ( + + ))} diff --git a/src/pages/who-we-are/_data.ts b/src/pages/who-we-are/_data.ts index 5c00221a6d5..e12168950ef 100644 --- a/src/pages/who-we-are/_data.ts +++ b/src/pages/who-we-are/_data.ts @@ -89,3 +89,52 @@ export const our_principles: PrincipleType[] = [ color: 'rgba(119, 160, 198, 0.25)', }, ] + +export type MapPinType = { + left: string + top: string + title: string + link: string +} + +export const desktop_pins: MapPinType[] = [ + { left: '30%', top: '75%', title: localize('Paraguay'), link: '/careers/locations/asuncion' }, + { left: '50%', top: '39.5%', title: localize('Malta'), link: '/careers/locations/malta' }, + { left: '55%', top: '40%', title: localize('Cyprus'), link: '/careers/locations/cyprus' }, + { left: '54%', top: '61.5%', title: localize('Rwanda'), link: '/careers/locations/rwanda' }, + { left: '54%', top: '27.5%', title: localize('Belarus'), link: '/careers/locations/minsk' }, + { left: '61.5%', top: '45.9%', title: localize('Dubai'), link: '/careers/locations/dubai' }, + { left: '73.3%', top: '57.5%', title: localize('Ipoh'), link: '/careers/locations/ipoh' }, + { + left: '74.2%', + top: '58.5%', + title: localize('Cyberjaya'), + link: '/careers/locations/cyberjaya', + }, + { left: '74.2%', top: '60.6%', title: localize('Melaka'), link: '/careers/locations/melaka' }, + { left: '77.2%', top: '58.7%', title: localize('Labuan'), link: '/careers/locations/labuan' }, + { left: '45.8%', top: '28%', title: localize('London'), link: '/careers/locations/london' }, + { left: '47.4%', top: '30.9%', title: localize('Paris'), link: '/careers/locations/paris' }, + { + left: '44.5%', + top: '30.9%', + title: localize('Guernsey'), + link: '/careers/locations/guernsey', + }, +] + +export const mobile_pins: MapPinType[] = [ + { left: '28.5%', top: '71%', title: localize('Paraguay'), link: '/careers/locations/asuncion' }, + { left: '48.5%', top: '35.5%', title: localize('Malta'), link: '/careers/locations/malta' }, + { left: '53.5%', top: '36%', title: localize('Cyprus'), link: '/careers/locations/cyprus' }, + { left: '52.5%', top: '57.5%', title: localize('Rwanda'), link: '/careers/locations/rwanda' }, + { left: '52.5%', top: '23.5%', title: localize('Belarus'), link: '/careers/locations/minsk' }, + { left: '60%', top: '41.9%', title: localize('Dubai'), link: '/careers/locations/dubai' }, + { left: '72.3%', top: '51.2%', title: localize('Ipoh'), link: '/careers/locations/ipoh' }, + { left: '71%', top: '55%', title: localize('Cyberjaya'), link: '/careers/locations/cyberjaya' }, + { left: '73%', top: '56.7%', title: localize('Melaka'), link: '/careers/locations/melaka' }, + { left: '76%', top: '54.7%', title: localize('Labuan'), link: '/careers/locations/labuan' }, + { left: '44.3%', top: '24%', title: localize('London'), link: '/careers/locations/london' }, + { left: '45.9%', top: '26.9%', title: localize('Paris'), link: '/careers/locations/paris' }, + { left: '43%', top: '26.9%', title: localize('Guernsey'), link: '/careers/locations/guernsey' }, +]