Skip to content

Commit

Permalink
Merge pull request #365 from newrelic/cayla/remove-edit-button
Browse files Browse the repository at this point in the history
Removes edit button for component docs
  • Loading branch information
caylahamann authored Jul 1, 2020

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
2 parents 6b7342d + 70b70a9 commit 2d1cfdb
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/components/Footer.js
Original file line number Diff line number Diff line change
@@ -11,6 +11,9 @@ import PropTypes from 'prop-types';

const Footer = ({ className }) => {
const { fileRelativePath } = useContext(PageContext);
const isComponentDoc = fileRelativePath.includes(
'src/markdown-pages/components'
);

return (
<footer className={cx(styles.footer, className)}>
@@ -32,7 +35,7 @@ const Footer = ({ className }) => {
<FeatherIcon className={styles.linkIcon} name="pen" size="1rem" />
Terms of service
</Link>
{fileRelativePath && (
{fileRelativePath && !isComponentDoc && (
<ExternalLink
className={styles.link}
href={`${githubBaseUrl}/blob/master/${fileRelativePath}`}
5 changes: 4 additions & 1 deletion src/components/GlobalHeader.js
Original file line number Diff line number Diff line change
@@ -12,6 +12,9 @@ import styles from './GlobalHeader.module.scss';

const GlobalHeader = ({ className }) => {
const { fileRelativePath } = useContext(PageContext);
const isComponentDoc = fileRelativePath.includes(
'src/markdown-pages/components'
);

return (
<div className={cx(styles.globalHeaderContainer, className)}>
@@ -58,7 +61,7 @@ const GlobalHeader = ({ className }) => {
</div>

<ul className={styles.rightSideButtons}>
{fileRelativePath && (
{fileRelativePath && !isComponentDoc && (
<li className={styles.rightSideButton}>
<ExternalLink
href={`${githubBaseUrl}/blob/master/${fileRelativePath}`}

0 comments on commit 2d1cfdb

Please sign in to comment.