From 1282d3ed694b5bff81056add5a08d98b11ac9033 Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Wed, 30 Aug 2023 16:24:39 +0300 Subject: [PATCH] feat: link with arrows clickable and reduced --- src/components/General/LinkWithArrow.tsx | 38 +++++++++++++++--------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/src/components/General/LinkWithArrow.tsx b/src/components/General/LinkWithArrow.tsx index 89f658d2..6f9dcce9 100644 --- a/src/components/General/LinkWithArrow.tsx +++ b/src/components/General/LinkWithArrow.tsx @@ -1,6 +1,5 @@ -import { Text } from '@status-im/components' -import { Link } from 'react-router-dom' -import { Stack, XStack } from 'tamagui' +import { Link, useNavigate } from 'react-router-dom' +import { XStack } from 'tamagui' import { ArrowLeftIcon, ArrowRightIcon } from '@status-im/icons' type LinkWithArrowProps = { @@ -12,18 +11,29 @@ type LinkWithArrowProps = { } const LinkWithArrow = ({ text, to, arrowLeft, arrowRight, style }: LinkWithArrowProps) => { + const navigate = useNavigate() + + const navigateHandler = () => { + navigate(to) + } + return ( - - - - {arrowLeft && } - - {text} - - {arrowRight && } - - - + + {arrowLeft && } + + {text} + + {arrowRight && } + ) }