This repository has been archived on 2022-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
tribalwarshelp.com/src/components/Link.js

13 lines
314 B
JavaScript
Raw Normal View History

import React from "react";
import { Link as GatsbyLink } from "gatsby";
import { Link as MUILink } from "@material-ui/core";
function Link({ href, to, ...rest }) {
if (to) {
return <MUILink component={GatsbyLink} to={to} {...rest} />;
}
return <MUILink href={href} {...rest} />;
}
export default Link;