Skip to content

Commit

Permalink
Fix Marketing Links (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinejaussoin authored May 19, 2023
1 parent 3c62be4 commit 9d7169d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
23 changes: 16 additions & 7 deletions marketing/src/containers/Pricing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from './pricing.style';
import { useTranslation } from 'next-i18next';
import { StaticImageData } from 'next/image';
import styled from 'styled-components';
import { useConfig } from '@/common/hooks/useConfig';

type Pricing = {
id: number;
Expand Down Expand Up @@ -110,6 +110,7 @@ function toPrice(
const Pricing = () => {
const [isMonthly, setIsMonthly] = useState(true);
const { t } = useTranslation();
const { appUrl } = useConfig();

const handleToggle = () => {
setIsMonthly(!isMonthly);
Expand Down Expand Up @@ -203,13 +204,21 @@ const Pricing = () => {
{/* <Figure>
<NextImage src={priceTable.icon} alt={t(`${key}.title`)} />
</Figure> */}
<Button
title={
priceTable.isSubscribe
? t('Pricing.subscribe')!
: t('Pricing.login')!
<a
href={
priceTable.isSubscribe ? `${appUrl}/subscribe` : appUrl
}
/>
target="_blank"
rel="noreferrer"
>
<Button
title={
priceTable.isSubscribe
? t('Pricing.subscribe')!
: t('Pricing.login')!
}
/>
</a>
{/* <a className="link" href={"todo"}>
{priceTable.details.label}{' '}
<Icon size={20} icon={ic_keyboard_arrow_right} />
Expand Down
3 changes: 2 additions & 1 deletion marketing/src/containers/Pricing/pricing.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const PriceTable = styled.div`
}
}
button {
justify-self: flex-end;
justify-self: center;
border-radius: 10px;
font-weight: 700;
font-size: 15px;
Expand All @@ -202,6 +202,7 @@ export const PriceTable = styled.div`
}
}
a {
justify-content: center;
color: ${themeGet('colors.textColorLight')};
font-size: 14px;
line-height: 42px;
Expand Down

0 comments on commit 9d7169d

Please sign in to comment.