Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

nikolai.berestevich/fix/tom2 #2431

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions src/pages/about-us/_OurLeadership.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FocusEvent } from 'react'
import React, { MouseEventHandler } from 'react'
import styled from 'styled-components'
import { graphql, useStaticQuery } from 'gatsby'
import { ImageDataLike } from 'gatsby-plugin-image'
Expand Down Expand Up @@ -108,10 +108,14 @@ const ModalFlex = styled(Flex)`
top: 98px;
}
`
type MouseEvent = React.MouseEventHandler<HTMLDivElement> &
((event: MouseEventHandler<HTMLDivElement>) => void)
type StyledImageWrapperPropsType = ImageWrapperProps & {
onMouseOver: (event: FocusEvent<any>) => void
onMouseLeave: (event: FocusEvent<any>) => void
onMouseOver: MouseEvent
onMouseLeave: MouseEvent
tabindex: string
width: string
height: string
}
const StyledImageWrapper = styled(ImageWrapper)<StyledImageWrapperPropsType>`
display: flex;
Expand Down Expand Up @@ -141,9 +145,7 @@ const StyledImageWrapper = styled(ImageWrapper)<StyledImageWrapperPropsType>`
@media ${device.mobileL} {
width: 88px;
height: 108px;
}


}
}
`

Expand Down Expand Up @@ -187,13 +189,10 @@ const Modal = ({ name, position, link }: ModalPropsType) => {
>
{position}
</Header>
{/* Tom doesn't have linkedin page so we don't use LocalizedLink */}
{link ? (
{link && (
<LocalizedLink external="true" to={link} target="_blank" rel="noopener noreferrer">
<StyledLogo src={Linkedin} alt="" link={link} />
</LocalizedLink>
) : (
<StyledLogo src={Linkedin} alt="" link={link} />
)}
</ModalFlex>
)
Expand All @@ -211,10 +210,10 @@ type LeaderProps = {
}
const Leader = ({ leader }: LeaderProps) => {
const [isPopupShown, setIsPopupShown] = React.useState(false)
const showModal = (event: FocusEvent<any>) => {
const showModal: MouseEvent = () => {
setIsPopupShown(true)
}
const dontShowModal = (event: FocusEvent<any>) => {
const dontShowModal: MouseEvent = () => {
setIsPopupShown(false)
}
return (
Expand Down