From 18111707d628c4cdd2ac78e1cfb29d5edaa1a163 Mon Sep 17 00:00:00 2001 From: Diogo Soares <32431609+DiogoSoaress@users.noreply.github.com> Date: Fri, 31 May 2024 10:39:57 +0200 Subject: [PATCH] fix: open internal links in same tab (#358) * fix: internal links don't open in a new tab * fix Pressroom cards layout --- .../Pressroom/ContentsNavigation/index.tsx | 30 ++++++++----------- .../common/LinkCard/styles.module.css | 1 - 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/components/Pressroom/ContentsNavigation/index.tsx b/src/components/Pressroom/ContentsNavigation/index.tsx index d71c7f8a8..be177c3b6 100644 --- a/src/components/Pressroom/ContentsNavigation/index.tsx +++ b/src/components/Pressroom/ContentsNavigation/index.tsx @@ -7,6 +7,8 @@ import { PRESS_LINK } from '@/config/constants' type NavItemType = { label: string href: string + target?: HTMLAnchorElement['target'] + rel?: HTMLAnchorElement['rel'] } export const enum PressroomIds { @@ -20,30 +22,22 @@ const sections: NavItemType[] = [ { label: 'Safe in the news', href: `#${PressroomIds.SAFE_IN_THE_NEWS}` }, { label: 'Press releases', href: `#${PressroomIds.PRESS_RELEASES}` }, { label: 'Blog', href: AppRoutes.blog.index }, - { label: 'Media kit', href: PRESS_LINK }, + { label: 'Media kit', href: PRESS_LINK, target: '_blank', rel: 'noopener noreferrer' }, ] const ContentsNavigation = () => ( What are you looking for? - {sections.map((item) => { - const isAnchor = item.href.startsWith('#') - - return ( - - - - {item.label} - - - - ) - })} + {sections.map((item) => ( + + + + {item.label} + + + + ))} ) diff --git a/src/components/common/LinkCard/styles.module.css b/src/components/common/LinkCard/styles.module.css index e8b398911..551857474 100644 --- a/src/components/common/LinkCard/styles.module.css +++ b/src/components/common/LinkCard/styles.module.css @@ -35,7 +35,6 @@ -webkit-line-clamp: 4; -webkit-box-orient: vertical; flex-shrink: 0; - margin-top: auto; } .card:hover .arrow path {