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 = [
{
title: 'Connect a wallet',
description: 'Connect your preferred crypto wallet to the Uniswap Interface.',
imgSrc: walletsSrc,
lightImgSrc: walletsSrc,
darkImgSrc: walletsSrc,
},
{
title: 'Swap!',
description: 'Trade crypto and NFTs through Uniswap’s platform',
imgSrc: swapSrc,
lightImgSrc: swapSrc,
darkImgSrc: swapSrc,
},
]
......@@ -131,6 +131,8 @@ export default function About() {
}, [])
const [selectedStepIndex, setSelectedStepIndex] = useState(0)
const selectedStep = STEPS[selectedStepIndex]
const thumbnailImgSrc = isDarkMode ? selectedStep?.darkImgSrc : selectedStep?.lightImgSrc
return (
<Page isDarkMode={isDarkMode} titleHeight={titleHeight}>
......@@ -166,7 +168,7 @@ export default function About() {
<SubTitle isDarkMode={isDarkMode}>Get Started</SubTitle>
<Panels>
<ThumbnailContainer>
<Thumbnail alt="Thumbnail" src={STEPS[selectedStepIndex]?.imgSrc} />
<Thumbnail alt="Thumbnail" src={thumbnailImgSrc} />
</ThumbnailContainer>
<StepList>
{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