@@ -5,7 +5,7 @@ import React, {
55 useState ,
66 useEffect ,
77} from 'react' ;
8- import { css } from '@emotion/css ' ;
8+ import { css } from '@emotion/react ' ;
99
1010import { animated , useSpring } from 'react-spring' ;
1111import { useIntersection , usePrevious } from 'react-use' ;
@@ -97,9 +97,9 @@ const Project = ({ node, index }) => {
9797 const [ wasRevealed , setRevealed ] = useState ( false ) ;
9898 const anchor = slugToAnchor ( node . fields . slug ) ;
9999
100+ const theme = useTheme ( ) ;
100101 const projectRef = useRef ( ) ;
101102 const windowSize = useWindowSizeDef ( ) ;
102- const theme = useTheme ( ) ;
103103 const id = anchor . substring ( 1 ) ;
104104
105105 const wasSmallScreen = usePrevious ( windowSize . isMedium ) ;
@@ -174,7 +174,7 @@ const Project = ({ node, index }) => {
174174
175175 return (
176176 < Decorations
177- className = { styles . decorations }
177+ css = { styles . decorations }
178178 key = { key }
179179 layer = { key }
180180 { ...props }
@@ -205,34 +205,34 @@ const Project = ({ node, index }) => {
205205 } , [ renderLayer ] ) ;
206206
207207 return (
208- < div className = { styles . projectRowWrapper } ref = { projectRef } >
208+ < div css = { styles . projectRowWrapper } ref = { projectRef } >
209209 < Flex
210- className = { styles . projectRow }
210+ css = { styles . projectRow }
211211 id = { id }
212212 style = { revealAnimation }
213213 justifyContent = "space-between"
214214 >
215- < animated . div className = { styles . infoWrapper } >
216- < animated . div className = { styles . projectInfo } index = { index } >
217- < SubHeader className = { styles . projectTitle } >
215+ < animated . div css = { styles . infoWrapper } >
216+ < animated . div css = { styles . projectInfo } index = { index } >
217+ < SubHeader css = { styles . projectTitle } >
218218 < Link to = { node . fields . slug } marker = { node . frontmatter . marker } bold >
219219 { node . frontmatter . title }
220220 </ Link >
221221 </ SubHeader >
222222 < ImageCarousel
223- className = { styles . imageCarousel }
223+ css = { styles . imageCarousel }
224224 key = { `carousel-${ id } ` }
225225 images = { images }
226226 />
227227 < MarkdownContent
228- className = { styles . projectMarkdownContent ( theme ) }
228+ css = { styles . projectMarkdownContent ( theme ) }
229229 marker = { node . frontmatter . marker }
230230 dangerouslySetInnerHTML = { { __html : node . html } }
231231 />
232232 < Tags style = { tagAnimation } tags = { node . frontmatter . technologies } />
233233 </ animated . div >
234234 </ animated . div >
235- < animated . div className = { styles . imageWrapper } >
235+ < animated . div css = { styles . imageWrapper } >
236236 < FixedImageSet containerRef = { projectRef } images = { images } />
237237 </ animated . div >
238238 { decorationLayers }
0 commit comments