This repository was archived by the owner on Oct 2, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change
1
+ import Link from "next/link" ;
2
+
3
+ export default function ExternalLink ( { href, children, ...rest } ) {
4
+ return < Link target = { "_blank" } rel = { "noreferrer" } href = { href } { ...rest } > { children } </ Link > ;
5
+ }
Original file line number Diff line number Diff line change 1
1
import data from "@/config/app.json" ;
2
- import Link from "next/link " ;
2
+ import ExternalLink from "@/components/ExternalLink " ;
3
3
4
4
export default function Footer ( ) {
5
5
const githubUrl = "https://github.com/EddieHubCommunity/CreatorsRegistry" ;
@@ -11,7 +11,7 @@ export default function Footer() {
11
11
© { new Date ( ) . getFullYear ( ) } EddieHub All rights reserved | v
12
12
{ data . version }
13
13
</ div >
14
- < Link href = { githubUrl } > { githubUrl } </ Link >
14
+ < ExternalLink href = { githubUrl } > { githubUrl } </ ExternalLink >
15
15
</ div >
16
16
</ footer >
17
17
) ;
Original file line number Diff line number Diff line change 1
1
import { ChevronRightIcon } from "@heroicons/react/20/solid" ;
2
2
import Image from "next/image" ;
3
- import Link from "next/link" ;
4
3
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
5
4
6
5
import Badge from "@/components/Badge" ;
7
6
import socialIcon from "@/config/socialIcon" ;
7
+ import ExternalLink from "@/components/ExternalLink" ;
8
8
9
9
export default function Item ( { data } ) {
10
10
return (
@@ -33,10 +33,10 @@ export default function Item({ data }) {
33
33
) }
34
34
< div className = "min-w-0 flex-auto" >
35
35
< p className = "text-sm font-semibold leading-6 text-gray-900" >
36
- < Link href = { data . url } >
36
+ < ExternalLink href = { data . url } >
37
37
< span className = "absolute inset-x-0 -top-px bottom-0" />
38
38
{ data . urlText }
39
- </ Link >
39
+ </ ExternalLink >
40
40
</ p >
41
41
< p className = "mt-1 flex text-xs leading-5 text-gray-500" >
42
42
{ data . description }
You can’t perform that action at this time.
0 commit comments