@@ -8,9 +8,7 @@ import { SecretKeyInputComponent } from "@/features/decoder/components/secret-ke
88import { useDecoderStore } from "@/features/decoder/services/decoder.store" ;
99import { useRouter } from "next/navigation" ;
1010import {
11- SupportedTokenHashParamValues ,
12- WARNING_PARAM_KEY ,
13- WARNING_PARAM_VALUE ,
11+ SupportedTokenHashParamValues
1412} from "@/libs/config/project.constants" ;
1513import { HomeDictionaryModel } from "@/features/localization/models/home-dictionary.model" ;
1614import { ClaimDescriptionVisibilityValues } from "@/features/common/values/claim-description-visibility.values" ;
@@ -90,36 +88,9 @@ export const TokenDecoderComponent: React.FC<TokenDecoderComponentProps> = ({
9088 } ) ;
9189 } ;
9290
93- const handleWarning = ( ) => {
94- const search = window . location . search ;
95-
96- const searchParams = new URLSearchParams ( search ) ;
97- const warning = searchParams . get ( WARNING_PARAM_KEY ) ;
98-
99- if ( warning === WARNING_PARAM_VALUE ) {
100-
101- searchParams . delete ( WARNING_PARAM_KEY ) ;
102-
103- const currentUrl = window . location . href . split ( "?" ) [ 0 ] ;
104-
105- let newUrl = `${ currentUrl } ` ;
106-
107- if ( searchParams . size > 0 ) {
108- newUrl += `?${ searchParams . toString ( ) } ` ;
109- }
110-
111- if ( window . location . hash ) {
112- newUrl += window . location . hash ;
113- }
114-
115- router . push ( newUrl ) ;
116- }
117- } ;
118-
11991 window . addEventListener ( "hashchange" , handleHashChange ) ;
120-
92+
12193 handleHashChange ( ) ;
122- handleWarning ( ) ;
12394
12495 return ( ) => {
12596 window . removeEventListener ( "hashchange" , handleHashChange ) ;
0 commit comments