1
+ import Image from "next/image"
1
2
import { useRef , useState } from "react"
2
- import Img from "react-cool-img"
3
3
import { makeStyles } from "tss-react/mui"
4
4
5
5
import { Box , Button , Stack , SvgIcon , Typography } from "@mui/material"
@@ -15,6 +15,18 @@ import useCheckViewport from "@/hooks/useCheckViewport"
15
15
16
16
import NetworkLabel from "./NetworkLabel"
17
17
18
+ export interface Protocol {
19
+ name : string
20
+ desc : string
21
+ ext : string
22
+ // networkLabel: "Mainnet" | "Testnet"
23
+ networkLabel : string
24
+ rank : object
25
+ tags : string [ ]
26
+ twitterHandle : string
27
+ website : string
28
+ }
29
+
18
30
const useStyles = makeStyles ( ) ( theme => ( {
19
31
grid : {
20
32
backgroundColor : theme . vars . palette . themeBackground . normal ,
@@ -123,7 +135,7 @@ const useStyles = makeStyles()(theme => ({
123
135
} ) )
124
136
125
137
const ProtocolCard = props => {
126
- const { name, hash , ext, tags, desc, website, twitterHandle, networkLabel, onResize, className, ...restProps } = props
138
+ const { name, ext, tags, desc, website, twitterHandle, networkLabel, onResize, className, ...restProps } = props
127
139
const { classes, cx } = useStyles ( )
128
140
const { isMobile, isDesktop } = useCheckViewport ( )
129
141
@@ -146,7 +158,13 @@ const ProtocolCard = props => {
146
158
gridArea : "logo" ,
147
159
} }
148
160
>
149
- < Img alt = { name } src = { fetchEcosystemProtocolLogo ( name , ext ) } placeholder = { hash } width = { isMobile ? 48 : 88 } height = { isMobile ? 48 : 88 } > </ Img > { " " }
161
+ < Image
162
+ alt = { name }
163
+ src = { fetchEcosystemProtocolLogo ( name , ext ) }
164
+ placeholder = "empty"
165
+ width = { isMobile ? 48 : 88 }
166
+ height = { isMobile ? 48 : 88 }
167
+ > </ Image >
150
168
</ Stack >
151
169
< Stack direction = "row" alignItems = "center" gap = "0.8rem" className = { classes . name } >
152
170
< Typography
0 commit comments