open external link in new tab

pull/760/head
Anton Mushnin 2023-03-01 13:23:22 +03:00
rodzic 059d759890
commit f497b90da2
4 zmienionych plików z 26 dodań i 1 usunięć

Wyświetl plik

@ -172,6 +172,11 @@ const AppNavbar = () => {
<MenuItem
key={`menu-${idx}`}
as={"a"}
target={
child.type === PAGETYPE.EXTERNAL
? "_blank"
: "_self"
}
m={0}
color="white"
fontWeight="400"

Wyświetl plik

@ -17,6 +17,7 @@ import {
PRIMARY_MOON_LOGO_URL,
SITEMAP,
BACKGROUND_COLOR,
PAGETYPE,
} from "../core/constants";
import moment from "moment";
import { AWS_ASSETS_PATH } from "../core/constants";
@ -166,7 +167,16 @@ const Footer = () => {
href={linkItem.path}
key={`footer-list-link-item-${linkItemIndex}-col-${colIndex}`}
>
<Link {...LINKS_SIZES}>{linkItem.title}</Link>
<Link
{...LINKS_SIZES}
target={
linkItem.type === PAGETYPE.EXTERNAL
? "_blank"
: "_self"
}
>
{linkItem.title}
</Link>
</RouterLink>
);
})}

Wyświetl plik

@ -125,6 +125,11 @@ const LandingBarMobile = () => {
color="white"
key={`menu-${idx}`}
as={"a"}
target={
child.type === PAGETYPE.EXTERNAL
? "_blank"
: "_self"
}
m={0}
fontSize="sm"
_focus={{ backgroundColor: "black.300" }}

Wyświetl plik

@ -103,6 +103,11 @@ const LandingNavbar = () => {
<MenuItem
key={`menu-${idx}`}
as={"a"}
target={
child.type === PAGETYPE.EXTERNAL
? "_blank"
: "_self"
}
m={0}
color="white"
fontWeight="400"