|
1 | 1 | import { useEffect, useState } from 'react'
|
2 | 2 | import { generatePath, useRouteMatch } from 'react-router-dom'
|
3 | 3 |
|
4 |
| -import { DeploymentConfigDiff, DeploymentConfigDiffProps } from '@Shared/Components/DeploymentConfigDiff' |
5 |
| -import { DEFAULT_BASE_PAGE_SIZE, SortingOrder } from '@Common/Constants' |
| 4 | +import { |
| 5 | + DEPLOYMENT_CONFIG_DIFF_SORT_KEY, |
| 6 | + DeploymentConfigDiff, |
| 7 | + DeploymentConfigDiffProps, |
| 8 | +} from '@Shared/Components/DeploymentConfigDiff' |
| 9 | +import { DEFAULT_BASE_PAGE_SIZE } from '@Common/Constants' |
6 | 10 | import { useUrlFilters } from '@Common/Hooks'
|
7 | 11 | import {
|
8 | 12 | getSelectPickerOptionByValue,
|
@@ -43,6 +47,7 @@ export const DeploymentHistoryConfigDiffCompare = ({
|
43 | 47 | string,
|
44 | 48 | DeploymentHistoryConfigDiffQueryParams
|
45 | 49 | >({
|
| 50 | + initialSortKey: DEPLOYMENT_CONFIG_DIFF_SORT_KEY, |
46 | 51 | parseSearchParams: parseDeploymentHistoryDiffSearchParams(previousWfrId),
|
47 | 52 | })
|
48 | 53 |
|
@@ -170,7 +175,7 @@ export const DeploymentHistoryConfigDiffCompare = ({
|
170 | 175 | return null
|
171 | 176 | }
|
172 | 177 |
|
173 |
| - const onSorting = () => handleSorting(sortOrder !== SortingOrder.DESC ? 'sort-config' : '') |
| 178 | + const onSorting = () => handleSorting(DEPLOYMENT_CONFIG_DIFF_SORT_KEY) |
174 | 179 |
|
175 | 180 | const sortingConfig: DeploymentConfigDiffProps['sortingConfig'] = {
|
176 | 181 | handleSorting: onSorting,
|
|
0 commit comments