Skip to content

Commit 087af5c

Browse files
committed
feat: add key to create app routes
1 parent 8feb158 commit 087af5c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/components/app/list-new/AppList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ import {
3636
import { getCommonAppFilters } from '@Services/service'
3737
import { Cluster } from '@Services/service.types'
3838
import { useAppContext } from '../../common'
39-
import { SERVER_MODE, DOCUMENTATION, URLS } from '../../../config'
39+
import { SERVER_MODE, DOCUMENTATION } from '../../../config'
4040
import HelmAppList from './HelmAppList'
4141
import { AppListPropType } from '../list/types'
4242
import { AddNewApp } from '../create/CreateApp'
4343
import '../list/list.scss'
4444
import EAEmptyState, { EAEmptyStateType } from '../../common/eaEmptyState/EAEmptyState'
45-
import { FLUX_CD_HELM_RELEASE_LABEL } from './Constants'
45+
import { appListUrls, FLUX_CD_HELM_RELEASE_LABEL } from './Constants'
4646
import { getModuleInfo } from '../../v2/devtronStackManager/DevtronStackManager.service'
4747
import {
4848
getAppStatusFormattedValue,
@@ -401,12 +401,12 @@ const AppList = ({ isArgoInstalled }: AppListPropType) => {
401401
}
402402

403403
function renderAppCreateRouter() {
404-
const appListUrls = [URLS.DEVTRON_APP_LIST, URLS.HELM_APP_LIST, URLS.ARGO_APP_LIST, URLS.FLUX_APP_LIST]
405404
return (
406405
<Switch>
407406
{appListUrls.map((currentUrl) => (
408407
<Route
409408
path={`${currentUrl}/${AppListConstants.CREATE_DEVTRON_APP_URL}`}
409+
key={currentUrl}
410410
render={(props) => (
411411
<AddNewApp
412412
close={closeDevtronAppCreateModal}

src/components/app/list-new/Constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import { OptionType, SelectPickerOptionType } from '@devtron-labs/devtron-fe-common-lib'
18+
import { URLS } from '@Config/routes'
1819
import { AppStatuses, AppStatusesDTO, FluxCDTemplateType } from './AppListType'
1920

2021
export const APP_LIST_HEADERS = {
@@ -95,3 +96,5 @@ export const APPS_WITH_NO_PROJECT_OPTION: OptionType = {
9596
label: 'Apps with no project',
9697
value: '0',
9798
}
99+
100+
export const appListUrls = [URLS.DEVTRON_APP_LIST, URLS.HELM_APP_LIST, URLS.ARGO_APP_LIST, URLS.FLUX_APP_LIST]

0 commit comments

Comments
 (0)