@@ -19,9 +19,11 @@ const {
1919
2020const { t : $t } = useTranslation ()
2121
22+ export type BlockchainSearchFilters = ' address' | ' block' | ' epoch' | ' slot' | ' token' | ' transaction' | ' validator'
23+
2224const emit = defineEmits <{
2325 (e : ' search' , input : string ): void ,
24- (e : ' click:example' , type : ' address ' | ' token ' | ' transaction ' | ' validator ' ): void ,
26+ (e : ' click:example' , type : BlockchainSearchFilters ): void ,
2527}>()
2628
2729const searchParams = defineModel <BlockchainSearchParams >({
@@ -34,21 +36,29 @@ const chips: { label: string, value: BlockchainSearchParams['types'][number] }[]
3436 value: ' address' ,
3537 },
3638 {
37- label: $t (' products.landing_page.search.types.transactions ' ),
38- value: ' transaction ' ,
39+ label: $t (' products.landing_page.search.types.blocks ' ),
40+ value: ' block ' ,
3941 },
4042 {
41- label: $t (' products.landing_page.search.types.validators_indices ' ),
42- value: ' validator_by_index ' ,
43+ label: $t (' products.landing_page.search.types.epochs ' ),
44+ value: ' epoch ' ,
4345 },
4446 {
45- label: $t (' products.landing_page.search.types.blocks ' ),
46- value: ' block ' ,
47+ label: $t (' products.landing_page.search.types.slots ' ),
48+ value: ' slot ' ,
4749 },
4850 {
4951 label: $t (' products.landing_page.search.types.tokens' ),
5052 value: ' token' ,
5153 },
54+ {
55+ label: $t (' products.landing_page.search.types.transactions' ),
56+ value: ' transaction' ,
57+ },
58+ {
59+ label: $t (' products.landing_page.search.types.validators_indices' ),
60+ value: ' validator_by_index' ,
61+ },
5262]
5363
5464const handleSearch = (input : string ) => {
@@ -98,7 +108,7 @@ watch(hasResults, () => {
98108 isHistoryVisible .value = true
99109})
100110const searchInput = useTemplateRef <ComponentPublicInstance | null >(' searchInput' )
101- const handleClickExample = (type : ' address ' | ' token ' | ' transaction ' | ' validator ' ) => {
111+ const handleClickExample = (type : BlockchainSearchFilters ) => {
102112 emit (' click:example' , type )
103113 isHistoryVisible .value = false
104114 const input = searchInput .value ?.$el .querySelector (' input' )
0 commit comments