import React, { useState, useEffect } from 'react'; import { CSSTransition, TransitionGroup } from 'react-transition-group'; import styled from 'styled-components'; import { navDelay, loaderDelay } from '@utils'; import { usePrefersReducedMotion } from '@hooks'; const StyledHeroSection = styled.section` ${({ theme }) => theme.mixins.flexCenter}; flex-direction: column; align-items: flex-start; min-height: 100vh; height: 100vh; padding: 0; @media (max-height: 700px) and (min-width: 700px), (max-width: 360px) { height: auto; padding-top: var(--nav-height); } h1 { margin: 0 0 30px 4px; color: var(--green); font-family: var(--font-mono); font-size: clamp(var(--fz-sm), 5vw, var(--fz-md)); font-weight: 400; @media (max-width: 480px) { margin: 0 0 20px 2px; } } h3 { margin-top: 5px; color: var(--slate); line-height: 0.9; } p { margin: 20px 0 0; max-width: 540px; } .email-link { ${({ theme }) => theme.mixins.bigButton}; margin-top: 50px; } `; const Hero = () => { const [isMounted, setIsMounted] = useState(false); const prefersReducedMotion = usePrefersReducedMotion(); useEffect(() => { if (prefersReducedMotion) { return; } const timeout = setTimeout(() => setIsMounted(true), navDelay); return () => clearTimeout(timeout); }, []); const one =

Hi, my name is

; const two =

Brittany Chiang.

; const three =

I build things for the web.

; const four = ( <>

I’m a software engineer specializing in building (and occasionally designing) exceptional digital experiences. Currently, I’m focused on building accessible, human-centered products at{' '} Upstatement .

); const five = ( Check out my course! ); const items = [one, two, three, four, five]; return ( {prefersReducedMotion ? ( <> {items.map((item, i) => (
{item}
))} ) : ( {isMounted && items.map((item, i) => (
{item}
))}
)}
); }; export default Hero;