mirror of https://github.com/harness/drone.git
fix: [AH-421]: fix issue with double encoding in UI for artifact name in url params (#2757)
* fix: [AH-421]: fix issue with double encoding in UI for artifact name in url paramsabhinav-harness-patch-1
parent
eeb4688b59
commit
40a9472d4d
|
@ -16,12 +16,11 @@
|
|||
|
||||
import React, { useContext } from 'react'
|
||||
import { defaultTo } from 'lodash-es'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { Expander } from '@blueprintjs/core'
|
||||
import { Button, ButtonVariation, Layout, getErrorInfoFromErrorObject, useToaster } from '@harnessio/uicore'
|
||||
import { useUpdateArtifactLabelsMutation, type ArtifactSummary } from '@harnessio/react-har-service-client'
|
||||
|
||||
import { useGetSpaceRef } from '@ar/hooks'
|
||||
import { useDecodedParams, useGetSpaceRef } from '@ar/hooks'
|
||||
import { encodeRef } from '@ar/hooks/useGetSpaceRef'
|
||||
import { useStrings } from '@ar/frameworks/strings/String'
|
||||
import type { RepositoryPackageType } from '@ar/common/types'
|
||||
|
@ -48,7 +47,7 @@ function ArtifactDetailsHeaderContent(props: ArtifactDetailsHeaderContentProps):
|
|||
const spaceRef = useGetSpaceRef()
|
||||
const { getString } = useStrings()
|
||||
const { showSuccess, showError, clear } = useToaster()
|
||||
const pathParams = useParams<ArtifactDetailsPathParams>()
|
||||
const pathParams = useDecodedParams<ArtifactDetailsPathParams>()
|
||||
|
||||
const { repositoryIdentifier, artifactIdentifier } = pathParams
|
||||
const { packageType, imageName, modifiedAt, createdAt, downloadsCount, labels } = data as ArtifactSummary
|
||||
|
|
|
@ -18,7 +18,6 @@ import React, { useMemo, useRef } from 'react'
|
|||
import { Expander } from '@blueprintjs/core'
|
||||
import { defaultTo } from 'lodash-es'
|
||||
import { flushSync } from 'react-dom'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { useGetArtifactDeploymentsQuery, useGetDockerArtifactManifestsQuery } from '@harnessio/react-har-service-client'
|
||||
import {
|
||||
Button,
|
||||
|
@ -29,7 +28,7 @@ import {
|
|||
Page
|
||||
} from '@harnessio/uicore'
|
||||
|
||||
import { useGetSpaceRef, useParentHooks } from '@ar/hooks'
|
||||
import { useDecodedParams, useGetSpaceRef, useParentHooks } from '@ar/hooks'
|
||||
import { DEFAULT_PAGE_INDEX, PreferenceScope } from '@ar/constants'
|
||||
import { useStrings } from '@ar/frameworks/strings'
|
||||
import { encodeRef } from '@ar/hooks/useGetSpaceRef'
|
||||
|
@ -54,7 +53,7 @@ export default function DockerDeploymentsContent() {
|
|||
const searchRef = useRef({} as ExpandingSearchInputHandle)
|
||||
const { getString } = useStrings()
|
||||
const registryRef = useGetSpaceRef()
|
||||
const params = useParams<VersionDetailsPathParams>()
|
||||
const params = useDecodedParams<VersionDetailsPathParams>()
|
||||
|
||||
const { preference: sortingPreference, setPreference: setSortingPreference } = usePreferenceStore<string | undefined>(
|
||||
PreferenceScope.USER,
|
||||
|
|
Loading…
Reference in New Issue