Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kolebjak committed Jul 12, 2023
1 parent 8ab3055 commit 7772389
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
21 changes: 17 additions & 4 deletions src/components/FundWallet/components/BlockContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ type Props = {
description: string
link: string
linkText: string
onLinkClick: () => void;
onLinkClick: () => void
}

export const BlockContent = ({ title, description, linkText, link, onLinkClick }: Props) => {
export const BlockContent = ({
title,
description,
linkText,
link,
onLinkClick,
}: Props) => {
const linkContentElement = (
<SLinkContent>
<SLinkText fw={400} fs={14} color="primary100">
Expand All @@ -32,11 +38,18 @@ export const BlockContent = ({ title, description, linkText, link, onLinkClick }
<div>{title}</div>
<SBlockLink>
{link.includes("http") ? (
<a href={link} target="_blank" rel="noreferrer noopener" onClick={onLinkClick}>
<a
href={link}
target="_blank"
rel="noreferrer noopener"
onClick={onLinkClick}
>
{linkContentElement}
</a>
) : (
<Link to={link} onClick={onLinkClick}>{linkContentElement}</Link>
<Link to={link} onClick={onLinkClick}>
{linkContentElement}
</Link>
)}
</SBlockLink>
<SBlockDescription fw={400} color="neutralGray400" lh={20}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Link/Link.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link as RouterLink, LinkProps } from "@tanstack/react-location"

type Props = Pick<LinkProps, 'to' | 'children' | 'onClick'>
type Props = Pick<LinkProps, "to" | "children" | "onClick">

export const Link = (props: Props) => (<RouterLink {...props} />)
export const Link = (props: Props) => <RouterLink {...props} />

0 comments on commit 7772389

Please sign in to comment.