react-scroll-progress-read
Version:
Progress Bar for show position of scroll page
23 lines (18 loc) • 371 B
JavaScript
import React from 'react';
import GatsbyLink from 'gatsby-link';
const Link = ({ children, to, ...other }) => {
const internal = /^\/(?!\/)/.test(to);
if (internal) {
return (
<GatsbyLink to={to} {...other}>
{children}
</GatsbyLink>
);
}
return (
<a href={to} {...other}>
{children}
</a>
);
};
export default Link;