MCPcopy Create free account
hub / github.com/codebucks27/react-portfolio-final / Main

Function Main

src/components/Main.jsx:129–237  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127
128
129const Main = () => {
130
131 const [click, setClick] = useState(false);
132
133 const handleClick = () => setClick(!click);
134
135 return (
136 <MainContainer>
137 <DarkDiv $click={click}/>
138 <Container>
139 <PowerButton />
140 <LogoComponent theme={click ? 'dark' :'light'}/>
141 <SocialIcons theme={click ? 'dark' :'light'} />
142
143 <Center $click={click}>
144 <YinYang onClick={()=> handleClick()} width={click ? 120 : 200} height={click ? 120 : 200} fill='currentColor' />
145 <span>click here</span>
146 </Center>
147
148 <Contact target="_blank" href="mailto:codebucks27@gmail.com">
149 <motion.h2
150 initial={{
151 y:-200,
152 transition: { type:'spring', duration: 1.5, delay:1}
153 }}
154 animate={{
155 y:0,
156 transition: { type:'spring', duration: 1.5, delay:1}
157 }}
158 whileHover={{scale: 1.1}}
159 whileTap={{scale: 0.9}}
160
161 >
162 Say hi..
163 </motion.h2>
164 </Contact>
165 <BLOG to="/blog">
166 <motion.h2
167 initial={{
168 y:-200,
169 transition: { type:'spring', duration: 1.5, delay:1}
170 }}
171 animate={{
172 y:0,
173 transition: { type:'spring', duration: 1.5, delay:1}
174 }}
175 whileHover={{scale: 1.1}}
176 whileTap={{scale: 0.9}}
177 >
178 Blog
179 </motion.h2>
180 </BLOG>
181 <WORK to="/work" $click={click}>
182 <motion.h2
183 initial={{
184 y:-200,
185 transition: { type:'spring', duration: 1.5, delay:1}
186 }}

Callers

nothing calls this directly

Calls 1

handleClickFunction · 0.70

Tested by

no test coverage detected