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 11import data from "@/config/app.json" ;
2- import Link from "next/link " ;
2+ import ExternalLink from "@/components/ExternalLink " ;
33
44export default function Footer ( ) {
55 const githubUrl = "https://github.com/EddieHubCommunity/CreatorsRegistry" ;
@@ -11,7 +11,7 @@ export default function Footer() {
1111 © { new Date ( ) . getFullYear ( ) } EddieHub All rights reserved | v
1212 { data . version }
1313 </ div >
14- < Link href = { githubUrl } > { githubUrl } </ Link >
14+ < ExternalLink href = { githubUrl } > { githubUrl } </ ExternalLink >
1515 </ div >
1616 </ footer >
1717 ) ;
Original file line number Diff line number Diff line change 11import { ChevronRightIcon } from "@heroicons/react/20/solid" ;
22import Image from "next/image" ;
3- import Link from "next/link" ;
43import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
54
65import Badge from "@/components/Badge" ;
76import socialIcon from "@/config/socialIcon" ;
7+ import ExternalLink from "@/components/ExternalLink" ;
88
99export default function Item ( { data } ) {
1010 return (
@@ -33,10 +33,10 @@ export default function Item({ data }) {
3333 ) }
3434 < div className = "min-w-0 flex-auto" >
3535 < p className = "text-sm font-semibold leading-6 text-gray-900" >
36- < Link href = { data . url } >
36+ < ExternalLink href = { data . url } >
3737 < span className = "absolute inset-x-0 -top-px bottom-0" />
3838 { data . urlText }
39- </ Link >
39+ </ ExternalLink >
4040 </ p >
4141 < p className = "mt-1 flex text-xs leading-5 text-gray-500" >
4242 { data . description }
You can’t perform that action at this time.
0 commit comments