This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
skynet-webportal/packages/website/src/components/Link/Link.js

15 lines
397 B
JavaScript
Raw Normal View History

2021-03-29 21:32:17 +00:00
import * as React from "react";
import { Link as GatsbyLink } from "gatsby";
export default function Link({ children, to, activeClassName, partiallyActive, ...params }) {
if (to) {
return (
<GatsbyLink to={to} activeClassName={activeClassName} partiallyActive={partiallyActive} {...params}>
{children}
</GatsbyLink>
);
}
return <a {...params}>{children}</a>;
}