From a1ff1fe755811b32f051600e50e2de70ea7b3430 Mon Sep 17 00:00:00 2001 From: Avi Thour Date: Fri, 2 Dec 2022 21:49:09 +0530 Subject: [PATCH] Extracted the style objects and props into variable Extracted the common style objects and props into variables or constants to avoid repeating the same code and make the code easier to read. Instead of repeating the same _hover styles in multiple places, I created a hoverStyles object and used it in each Link component. --- src/components/layouts/Footer.tsx | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/src/components/layouts/Footer.tsx b/src/components/layouts/Footer.tsx index 14db5fddfe..cd9802ca11 100644 --- a/src/components/layouts/Footer.tsx +++ b/src/components/layouts/Footer.tsx @@ -12,6 +12,12 @@ import { import { DiscordIcon, GitHubIcon, TwitterIcon } from '../UI/icons'; +const hoverStyles = { + textDecoration: 'none', + bg: 'primary', + color: 'bg !important' +}; + export const Footer: FC = () => { return ( @@ -32,11 +38,7 @@ export const Footer: FC = () => {
{
{ lg: 'none' }} borderColor='primary !important' - _hover={{ - bg: 'primary' - }} + _hover={hoverStyles} p={4} > @@ -96,9 +92,7 @@ export const Footer: FC = () => {
{