diff --git a/src/components/anchor.tsx b/src/components/anchor.tsx index 7b15165..a1d11b6 100644 --- a/src/components/anchor.tsx +++ b/src/components/anchor.tsx @@ -6,12 +6,22 @@ import { HTMLAttributes } from 'react' export interface Props extends HTMLAttributes { href: string | UrlObject + /** + * Whether the type of the anchor is for external or internal links. + * + * @default false + */ + isExternal?: boolean } -export default function Anchor({ href, children, ...rest }: Props) { - return ( +export default function Anchor({ href, isExternal = false, children, ...rest }: Props) { + return !isExternal ? ( {children} + ) : ( + + {children} + ) } diff --git a/src/components/blocks/footer/footer.tsx b/src/components/blocks/footer/footer.tsx index 0e57b3e..fd1c54c 100644 --- a/src/components/blocks/footer/footer.tsx +++ b/src/components/blocks/footer/footer.tsx @@ -1,3 +1,5 @@ +'use client' + import Anchor from '@/components/anchor' import Package from '../../../../package.json' @@ -6,7 +8,10 @@ export default function Footer() { )