File tree Expand file tree Collapse file tree 4 files changed +40
-21
lines changed
Expand file tree Collapse file tree 4 files changed +40
-21
lines changed Original file line number Diff line number Diff line change 2020 "@vueuse/core" : " ^13.6.0" ,
2121 "@wagmi/vue" : " ^0.1.24" ,
2222 "clsx" : " ^2.1.1" ,
23+ "lucide-vue-next" : " ^0.539.0" ,
2324 "pinia" : " ^3.0.3" ,
2425 "reka-ui" : " ^2.4.1" ,
2526 "tailwind-merge" : " ^3.3.1" ,
Original file line number Diff line number Diff line change 11<template >
2- <Select
3- v-model = " selectedChainId "
4- : placeholder =" ' Select Chain' "
5- :class = " className "
6- @update:model-value = " handleChainChange "
7- >
8- < SelectItem
9- v-for =" chain in filteredChains "
10- :key =" chain.id"
11- :value = " chain.id.toString() "
12- :class = " className "
13- >
14- < div class = " flex items-center gap-2 " >
15- < img :src = " chain.icon " class = " size-4 " :alt = " chain.name" />
16- {{ chain.name }}
17- </div >
18- </SelectItem >
2+ <Select >
3+ < SelectTrigger >
4+ < SelectValue placeholder =" Select Chain" />
5+ </ SelectTrigger >
6+ < SelectContent >
7+ < SelectGroup
8+ v-for = " chain in filteredChains "
9+ :key =" chain.id "
10+ :value =" chain.id.toString() "
11+ :class = " className "
12+ >
13+ < SelectItem :value = " chain.id.toString() " >
14+ < img :src = " chain.icon " class = " size-4 " :alt = " chain.name " / >
15+ {{ chain.name }}
16+ </ SelectItem >
17+ </SelectGroup >
18+ </SelectContent >
1919 </Select >
2020</template >
2121
@@ -25,8 +25,14 @@ import { useAccount } from '@wagmi/vue';
2525import { useChainSwitch } from ' @/hooks/useChainSwitch' ;
2626import { getSupportedChains , getChainById } from ' @/utils/chain.utils' ;
2727import useUserStore from ' @/stores/useUser.store' ;
28- import Select from ' @/components/ui/Select.vue' ;
29- import SelectItem from ' @/components/ui/SelectItem.vue' ;
28+ import {
29+ Select ,
30+ SelectContent ,
31+ SelectGroup ,
32+ SelectItem ,
33+ SelectTrigger ,
34+ SelectValue ,
35+ } from ' @/components/ui/select' ;
3036
3137interface Props {
3238 className? : string ;
Original file line number Diff line number Diff line change 11import { arbitrum } from 'viem/chains' ;
22import { bellecour } from './bellecourChainConfig' ;
3+ import arbitrumLogo from '@/assets/icons/arbitrum.svg' ;
4+ import iexecLogo from '@/assets/icons/iexec-logo.png' ;
35
46export interface Chain {
57 id : number ;
@@ -28,15 +30,15 @@ export function getSupportedChains(): Chain[] {
2830 {
2931 id : arbitrum . id ,
3032 name : arbitrum . name ,
31- icon : '/assets/icons/arbitrum.svg' ,
33+ icon : arbitrumLogo ,
3234 nativeCurrency : arbitrum . nativeCurrency ,
3335 rpcUrls : arbitrum . rpcUrls ,
3436 blockExplorers : arbitrum . blockExplorers ,
3537 } ,
3638 {
3739 id : bellecour . id ,
3840 name : bellecour . name ,
39- icon : '/assets/icons/iexec-logo.png' ,
41+ icon : iexecLogo ,
4042 nativeCurrency : bellecour . nativeCurrency ,
4143 rpcUrls : bellecour . rpcUrls ,
4244 blockExplorers : bellecour . blockExplorers ,
You can’t perform that action at this time.
0 commit comments