Skip to content
Open
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
8 changes: 0 additions & 8 deletions src/renderTranslatedRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import flatMap from 'lodash.flatmap';

// eslint-disable-next-line max-params
const getRouteConfig = (configRoute, locale, currentLocale, pathFromRouteForPathsAndLocale) => {
const {paths, ...configRouteRest} = configRoute;

Expand All @@ -21,9 +20,7 @@ const getRouteConfig = (configRoute, locale, currentLocale, pathFromRouteForPath
getRouteConfigForLocale = (configRoute, currentLocale, pathFromRouteForPathsAndLocale) => locale =>
getRouteConfig(configRoute, locale, currentLocale, pathFromRouteForPathsAndLocale);

// eslint-disable-next-line max-params
const renderTranslatedRoutesForLocales = (
configRoute,
routes,
locales,
currentLocale,
Expand All @@ -45,24 +42,20 @@ const renderTranslatedRoutesForLocales = (
);
}),
),
// eslint-disable-next-line max-params
renderTranslatedRoutesForConfig = (
configRoute,
routes,
currentLocale,
pathFromRouteForPathsAndLocale,
getRouteConfigForCurrentLocale,
) => locales =>
renderTranslatedRoutesForLocales(
configRoute,
routes,
locales,
currentLocale,
pathFromRouteForPathsAndLocale,
getRouteConfigForCurrentLocale,
);

// eslint-disable-next-line max-params
const renderTranslatedRoutes = (locales, routes, pathFromRouteForPathsAndLocale) => currentLocale => (
config,
iterationLocale,
Expand All @@ -75,7 +68,6 @@ const renderTranslatedRoutes = (locales, routes, pathFromRouteForPathsAndLocale)
pathFromRouteForPathsAndLocale,
),
renderTranslatedRoutesForCurrentConfig = renderTranslatedRoutesForConfig(
configRoute,
routes,
currentLocale,
pathFromRouteForPathsAndLocale,
Expand Down