New assets

This commit is contained in:
Fede Álvarez 2022-06-15 16:30:58 +02:00
parent ea95c606a2
commit da0130db58
3 changed files with 28 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

View File

@ -188,4 +188,8 @@
filter: invert(100%);
}
}
.hero__container {
mix-blend-mode: darken;
}
}

View File

@ -1,3 +1,6 @@
import { useTheme } from 'next-themes'
import { useEffect, useRef } from 'react'
import { Arrow } from '~/components/icons/arrow'
import Line from '~/components/icons/line'
import { Discord } from '~/components/icons/socials'
@ -19,21 +22,40 @@ interface Props {
}
const Hero = ({ data }: Props) => {
const { theme } = useTheme()
const contactHeroRef = useRef<HTMLImageElement>(null)
const contactHeroMobileRef = useRef<HTMLImageElement>(null)
useEffect(() => {
if (!contactHeroRef.current) return
if (!contactHeroMobileRef.current) return
contactHeroRef.current.src =
theme === 'dark'
? '/images/contact/banner-contact.png'
: '/images/contact/banner-contact-light.png'
contactHeroMobileRef.current.src =
theme === 'dark'
? '/images/contact/banner-contact.png'
: '/images/contact/banner-contact-light.png'
}, [theme])
return (
<Section className={s['section']} disableFadeIn>
<div className={s.gradient} />
<div className={s.hero__container}>
<img
ref={contactHeroRef}
className={s.hero}
loading="eager"
alt="hero"
src="/images/contact/banner-contact.png"
/>
<img
ref={contactHeroMobileRef}
className={s.hero__mobile}
loading="eager"
alt="hero"
src="/images/contact/banner-contact.png"
/>
</div>
<Container className={s['container']}>