Commit 480f3f29 authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

fix: handle light mode image in About step (#5601)

parent 5f2072f4
...@@ -29,11 +29,13 @@ export const STEPS = [ ...@@ -29,11 +29,13 @@ export const STEPS = [
{ {
title: 'Connect a wallet', title: 'Connect a wallet',
description: 'Connect your preferred crypto wallet to the Uniswap Interface.', description: 'Connect your preferred crypto wallet to the Uniswap Interface.',
imgSrc: walletsSrc, lightImgSrc: walletsSrc,
darkImgSrc: walletsSrc,
}, },
{ {
title: 'Swap!', title: 'Swap!',
description: 'Trade crypto and NFTs through Uniswap’s platform', description: 'Trade crypto and NFTs through Uniswap’s platform',
imgSrc: swapSrc, lightImgSrc: swapSrc,
darkImgSrc: swapSrc,
}, },
] ]
...@@ -131,6 +131,8 @@ export default function About() { ...@@ -131,6 +131,8 @@ export default function About() {
}, []) }, [])
const [selectedStepIndex, setSelectedStepIndex] = useState(0) const [selectedStepIndex, setSelectedStepIndex] = useState(0)
const selectedStep = STEPS[selectedStepIndex]
const thumbnailImgSrc = isDarkMode ? selectedStep?.darkImgSrc : selectedStep?.lightImgSrc
return ( return (
<Page isDarkMode={isDarkMode} titleHeight={titleHeight}> <Page isDarkMode={isDarkMode} titleHeight={titleHeight}>
...@@ -166,7 +168,7 @@ export default function About() { ...@@ -166,7 +168,7 @@ export default function About() {
<SubTitle isDarkMode={isDarkMode}>Get Started</SubTitle> <SubTitle isDarkMode={isDarkMode}>Get Started</SubTitle>
<Panels> <Panels>
<ThumbnailContainer> <ThumbnailContainer>
<Thumbnail alt="Thumbnail" src={STEPS[selectedStepIndex]?.imgSrc} /> <Thumbnail alt="Thumbnail" src={thumbnailImgSrc} />
</ThumbnailContainer> </ThumbnailContainer>
<StepList> <StepList>
{STEPS.map((step, index) => ( {STEPS.map((step, index) => (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment