Skip to content

Commit

Permalink
[docs-infra] Allows to remove edit button (#41702)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Mar 29, 2024
1 parent c78c780 commit 8e7a352
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/src/modules/components/EditPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ export default function EditPage(props) {
const { sourceLocation } = props;
const t = useTranslate();
const userLanguage = useUserLanguage();

if (!sourceLocation) {
// An empty div such that the footer layout stays unchanged.
return <div />;
}

const CROWDIN_ROOT_URL = 'https://crowdin.com/project/material-ui-docs/';
const crowdInLocale = LOCALES[userLanguage] || userLanguage;
const crowdInPath = sourceLocation.substring(0, sourceLocation.lastIndexOf('/'));
Expand Down

0 comments on commit 8e7a352

Please sign in to comment.