Skip to content

Commit

Permalink
fix: customer terms box ignoring language
Browse files Browse the repository at this point in the history
  • Loading branch information
joonatank committed Sep 20, 2024
1 parent 9c4a410 commit 55b55aa
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions packages/common/src/termsbox/TermsBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from "react";
import styled from "styled-components";
import { breakpoints } from "../common/style";
import { H6 } from "../common/typography";
import Link from "next/link";

type LinkT = {
href: string;
Expand Down Expand Up @@ -53,7 +54,7 @@ const Content = styled.div`
}
`;

const Links = styled.ul`
const LinkList = styled.ul`
list-style: none;
margin-bottom: 0;
padding: 0;
Expand All @@ -62,9 +63,7 @@ const Links = styled.ul`
gap: var(--spacing-2-xs);
`;

const Link = styled.li``;

const Anchor = styled.a`
const Anchor = styled(Link)`
color: var(--color-black) !important;
text-decoration: underline;
display: flex;
Expand Down Expand Up @@ -111,9 +110,9 @@ const TermsBox = ({
<Heading>{heading}</Heading>
<p>{body}</p>
{links && links?.length > 0 && (
<Links>
<LinkList>
{links.map((link) => (
<Link key={link.href}>
<li key={link.href}>
<Anchor
href={link.href}
target="_blank"
Expand All @@ -122,9 +121,9 @@ const TermsBox = ({
{link.text}
<IconLinkExternal aria-hidden />
</Anchor>
</Link>
</li>
))}
</Links>
</LinkList>
)}
</Content>
{canAccept && (
Expand Down

0 comments on commit 55b55aa

Please sign in to comment.