import type { GatsbyLinkProps } from 'gatsby-link' import Link from 'gatsby-link' import type { FC } from 'react' import React from 'react' import { useLocalizedPath } from './useLocalizedPath' type Props = GatsbyLinkProps const LocalizedLink: FC = (props) => { const { children, ...linkProps } = props const href = useLocalizedPath(props.to) return ( // @ts-expect-error - Safe to ignore this type error {children} ) } export default LocalizedLink