fix: remove redundant helper and guide code from Header
This commit is contained in:
committed by
mrugesh
parent
8ae0044682
commit
67d49efd1e
@@ -1,12 +0,0 @@
|
||||
exports.getGithubPath = function getGithubPath(fileAbsolutePath) {
|
||||
const { NODE_ENV: env } = process.env;
|
||||
const guideType = env === 'production' ? 'guide' : 'mock-guide';
|
||||
let githubFilePath =
|
||||
'https://github.com/freeCodeCamp/freeCodeCamp/blob/master/CONTRIBUTING.md#research-write-and-update-our-guide-articles';
|
||||
const pathIndex = fileAbsolutePath.indexOf(`/${guideType}`);
|
||||
if (pathIndex > -1) {
|
||||
const newPath = fileAbsolutePath.slice(pathIndex);
|
||||
githubFilePath = `https://github.com/freeCodeCamp/freeCodeCamp/blob/master${newPath}`;
|
||||
}
|
||||
return githubFilePath;
|
||||
};
|
Reference in New Issue
Block a user