Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes edit button for component docs #365

Merged
merged 4 commits into from
Jul 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)}>
Expand All @@ -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}`}
Expand Down
5 changes: 4 additions & 1 deletion src/components/GlobalHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)}>
Expand Down Expand Up @@ -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}`}
Expand Down