diff --git a/src/utils/CheckSectionVisibility.js b/src/utils/CheckSectionVisibility.js index 55b78954..b5b65f4e 100644 --- a/src/utils/CheckSectionVisibility.js +++ b/src/utils/CheckSectionVisibility.js @@ -42,23 +42,13 @@ const isSectionVisibleToUser = (displayData, currentUser, isGuest) => { }; /* Putting it all together, the function to export */ -const filterSectionVisibility = (sections) => { +const checkSectionVisibility = (sections) => { const currentUser = getCurrentUser(); // Get current user object const isGuest = isLoggedInAsGuest(); // Check if current user is a guest - // const sectionsToReturn = []; - // sections.forEach((currentSection) => { - // const displayData = currentSection.displayData || {}; - // if (isSectionVisibleToUser(displayData, currentUser, isGuest)) { - // sectionsToReturn.push(currentSection); - // } - // }); - - const filteredSections = sections.filter((currentSection) => { + return sections.filter((currentSection) => { const displayData = currentSection.displayData || {}; return isSectionVisibleToUser(displayData, currentUser, isGuest); }); - - return filteredSections; }; -export default filterSectionVisibility; +export default checkSectionVisibility; diff --git a/src/utils/ConfigHelpers.js b/src/utils/ConfigHelpers.js index 381a9c0f..d8ce987f 100644 --- a/src/utils/ConfigHelpers.js +++ b/src/utils/ConfigHelpers.js @@ -14,7 +14,6 @@ import { */ export const config = (() => { const Accumulator = new ConfigAccumulator(); - // return Accumulator.config(); return { appConfig: Accumulator.appConfig(), pageInfo: Accumulator.pageInfo(),