open all links in new tabs

This commit is contained in:
hsjobeki 2023-01-14 01:23:08 +01:00
parent 672f1b28c9
commit 6c4ae98227

View File

@ -102,12 +102,12 @@ export const Preview = (props: PreviewProps) => {
<ListItem sx={{ flexDirection: { xs: "column", sm: "row" }, px: 0 }}>
<ListItemIcon>
<Tooltip title={"read docs"}>
<MuiLink sx={{ m: "auto", color: "primary.light" }}>
<Link
<MuiLink
sx={{ m: "auto", color: "primary.light" }}
target="_blank"
href={!id.includes("builtins") ? libDocsRef : builtinsDocsRef}
>
<LocalLibraryIcon sx={{ m: "auto" }} />
</Link>
</MuiLink>
</Tooltip>
</ListItemIcon>
@ -131,15 +131,14 @@ export const Preview = (props: PreviewProps) => {
primary={
!id.includes("builtins") ? (
<Tooltip title={"browse source code"}>
<MuiLink>
<Link
<MuiLink
target={"_blank"}
href={`https://github.com/NixOS/nixpkgs/blob/master/${category.replace(
"./",
""
)}`}
>
{"github:NixOS/nixpkgs/" + category.replace("./", "")}
</Link>
</MuiLink>
</Tooltip>
) : (
@ -193,15 +192,15 @@ export const Preview = (props: PreviewProps) => {
<ListItem sx={{ flexDirection: { xs: "column", sm: "row" }, px: 0 }}>
<ListItemIcon>
<Tooltip title={"browse source code"}>
<MuiLink sx={{ m: "auto", color: "primary.light" }}>
<Link
<MuiLink
sx={{ m: "auto", color: "primary.light" }}
target="_blank"
href={`https://github.com/NixOS/nixpkgs/blob/master/${category.replace(
"./",
""
)}`}
>
<InputIcon sx={{ m: "auto" }} />
</Link>
</MuiLink>
</Tooltip>
</ListItemIcon>