Skip to content

Commit

Permalink
Merge pull request #701 from and-voila/hotfix-footer-link-to-pricing
Browse files Browse the repository at this point in the history
fix: footer link opening in new tab
  • Loading branch information
srizvi authored Jan 30, 2024
2 parents 98f9a6d + 961c252 commit 38521dc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions apps/ai/src/components/layout/site-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface FooterLinkData {
ariaLabel: string;
preText?: string;
mobileOnly?: boolean;
isLocal?: boolean;
}

const getCopyright = () => {
Expand All @@ -34,6 +35,7 @@ const FooterLink: React.FC<FooterLinkData> = ({
ariaLabel,
preText,
mobileOnly,
isLocal = false,
}) => (
<>
<hr
Expand All @@ -44,8 +46,7 @@ const FooterLink: React.FC<FooterLinkData> = ({
<a
href={href}
aria-label={ariaLabel}
target="_blank"
rel="noopener noreferrer"
{...(!isLocal && { target: '_blank', rel: 'noopener noreferrer' })}
className="text-sm font-medium text-primary transition-all hover:text-primary/80 hover:underline hover:underline-offset-4"
>
{label}
Expand All @@ -62,10 +63,11 @@ const links: FooterLinkData[] = [
preText: 'Designed in California by ',
},
{
href: 'https://andvoila.gg/pricing',
href: '/pricing',
label: 'Pricing',
ariaLabel: 'Navigate to Pricing page in a new window.',
ariaLabel: 'Navigate to Pricing page.',
mobileOnly: true,
isLocal: true,
},
{
href: 'https://andvoila.gg/privacy',
Expand Down

0 comments on commit 38521dc

Please sign in to comment.