diff --git a/src/app/(sok)/_components/utils/buildHomeOfficeValues.js b/src/app/(sok)/_components/utils/buildHomeOfficeValues.js deleted file mode 100644 index 51c08b692..000000000 --- a/src/app/(sok)/_components/utils/buildHomeOfficeValues.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function buildHomeOfficeValues(remote) { - const count = remote && remote.hjemmekontor && remote.hjemmekontor.doc_count ? remote.hjemmekontor.doc_count : 0; - - const facets = [ - { - key: "Hjemmekontor", - count, - }, - ]; - - return facets; -} diff --git a/src/app/(sok)/_components/utils/findUnknownSearchCriteriaValues.js b/src/app/(sok)/_components/utils/findUnknownSearchCriteriaValues.js deleted file mode 100644 index 6bc18a28c..000000000 --- a/src/app/(sok)/_components/utils/findUnknownSearchCriteriaValues.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * User may be using an outdated or not currently available search criteria value. - * For example, if user opens an old link containing ?engagementType=Julejobb, - * it can happen that 'Julejobb' is not an available value anymore. - * - * Returns a list of unknown search criteria values. - * @param searchCriteriaFromBrowserUrl: Search criteria from the browser url - * @param searchCriteriaFromApi: Available search criteria from search api - * @param nestedName, f.eks 'municipals'. - */ -export default function findUnknownSearchCriteriaValues( - searchCriteriaFromBrowserUrl, - searchCriteriaFromApi, - nestedName, -) { - return searchCriteriaFromBrowserUrl.filter((used) => { - const found = searchCriteriaFromApi.find((knownValue) => { - if (nestedName !== undefined && knownValue[nestedName]) { - return knownValue[nestedName].find((nested) => used === nested.key); - } - return used === knownValue.key; - }); - - return found === undefined; - }); -} diff --git a/src/app/(sok)/_components/utils/findZeroCountLocationFacets.js b/src/app/(sok)/_components/utils/findZeroCountLocationFacets.js deleted file mode 100644 index d26d56077..000000000 --- a/src/app/(sok)/_components/utils/findZeroCountLocationFacets.js +++ /dev/null @@ -1,9 +0,0 @@ -export default function findZeroCountLocationFacets(usersSearchCriteria, nationalCountMap, internationalCountMap) { - if (Array.isArray(usersSearchCriteria) && usersSearchCriteria.length > 0) { - return usersSearchCriteria.filter( - (c) => !(Object.keys(nationalCountMap).includes(c) || Object.keys(internationalCountMap).includes(c)), - ); - } - - return []; -}