File tree Expand file tree Collapse file tree 2 files changed +30
-2
lines changed
frontend/layers/products/app Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const {
1919
2020const { t : $t } = useTranslation ()
2121
22- export type BlockchainSearchFilters = ' address' | ' block' | ' epoch' | ' slot' | ' token' | ' transaction' | ' validator'
22+ export type BlockchainSearchFilters = ' address' | ' block' | ' epoch' | ' latest_block ' | ' latest_epoch ' | ' slot' | ' token' | ' transaction' | ' validator'
2323
2424const emit = defineEmits <{
2525 (e : ' search' , input : string ): void ,
@@ -131,7 +131,21 @@ const handleClickExample = (type: BlockchainSearchFilters) => {
131131 <template #search-examples >
132132 <div class =" flex items-center" >
133133 <section class =" flex gap-lg" >
134- <div class =" py-xs px-md border-gray-400 font-semibold text-gray-400" >
134+ <BaseChip
135+ :is-selected =" false"
136+ icon =" cube"
137+ @click =" handleClickExample('latest_block')"
138+ >
139+ {{ $t('products.landing_page.search.examples.latest_block') }}
140+ </BaseChip >
141+ <BaseChip
142+ :is-selected =" false"
143+ icon =" chart-line"
144+ @click =" handleClickExample('latest_epoch')"
145+ >
146+ {{ $t('products.landing_page.search.examples.latest_epoch') }}
147+ </BaseChip >
148+ <div class =" py-xs px-md border-l border-gray-400 font-semibold text-gray-400" >
135149 {{ $t('products.landing_page.search.examples.title') }}
136150 </div >
137151 <BaseChip
Original file line number Diff line number Diff line change @@ -84,6 +84,20 @@ const handleExampleClick = (type: BlockchainSearchFilters) => {
8484 types: [ ' address' ],
8585 }
8686 }
87+ if (type === ' latest_block' ) {
88+ searchParams .value = {
89+ ... searchParams .value ,
90+ input: ' /latest' ,
91+ types: [ ' block' ],
92+ }
93+ }
94+ if (type === ' latest_epoch' ) {
95+ searchParams .value = {
96+ ... searchParams .value ,
97+ input: ' /latest' ,
98+ types: [ ' epoch' ],
99+ }
100+ }
87101 if (type === ' token' ) {
88102 searchParams .value = {
89103 ... searchParams .value ,
You can’t perform that action at this time.
0 commit comments