22
33import React , { useState } from 'react'
44import Image from 'next/image'
5- import { Button } from '@/components/shared/Button'
5+ import nft1 from '../../public/Images/nft1.png'
6+ import nft2 from '../../public/Images/nft2.png'
7+ import nft3 from '../../public/Images/nft3.png'
8+ import nft4 from '../../public/Images/nft4.png'
9+ import nft5 from '../../public/Images/nft5.png'
10+ import nft6 from '../../public/Images/nft6.png'
11+ import nft7 from '../../public/Images/nft7.png'
12+ import nft8 from '../../public/Images/nft8.png'
13+ import strk from '../../public/Images/strk.png'
614
715export default function Tabs ( ) {
816 const [ activeTab , setActiveTab ] = useState ( 'Tokens' )
17+
18+ // Token data matching the first image
19+ const tokens = [
20+ {
21+ coin : 'STRK' ,
22+ price : '$0.46' ,
23+ balance : '5' ,
24+ value : '$460.43' ,
25+ size : '25%' ,
26+ } ,
27+ {
28+ coin : 'STRK' ,
29+ price : '$0.46' ,
30+ balance : '2' ,
31+ value : '$700.20' ,
32+ size : '25%' ,
33+ } ,
34+ {
35+ coin : 'STRK' ,
36+ price : '$0.46' ,
37+ balance : '3' ,
38+ value : '$527.00' ,
39+ size : '50%' ,
40+ } ,
41+ ]
42+
43+ // NFT data with correctly imported image objects
44+ const nfts = [
45+ {
46+ id : 1 ,
47+ image : nft1 ,
48+ } ,
49+ {
50+ id : 2 ,
51+ image : nft2 ,
52+ } ,
53+ {
54+ id : 3 ,
55+ image : nft3 ,
56+ } ,
57+ {
58+ id : 4 ,
59+ image : nft4 ,
60+ } ,
61+ {
62+ id : 5 ,
63+ image : nft5 ,
64+ } ,
65+ {
66+ id : 6 ,
67+ image : nft6 ,
68+ } ,
69+ {
70+ id : 7 ,
71+ image : nft7 ,
72+ } ,
73+ {
74+ id : 8 ,
75+ image : nft8 ,
76+ } ,
77+ ]
78+
979 return (
10- < >
80+ < div className = " text-white" >
1181 < div className = "flex border-b border-[#292929]" >
1282 < button
1383 onClick = { ( ) => setActiveTab ( 'Tokens' ) }
@@ -26,62 +96,74 @@ export default function Tabs() {
2696 activeTab === 'NFT' ? 'font-bold text-white' : 'text-[#8E9BAE]'
2797 } `}
2898 >
29- NFT Values
99+ NFT Token Vaults
30100 { activeTab === 'NFT' && (
31101 < div className = "absolute bottom-0 left-0 right-0 h-[.5px] bg-white" > </ div >
32102 ) }
33103 </ button >
34104 </ div >
35105
36106 { activeTab === 'Tokens' && (
37- < div className = "p-[20px] relative flex justify-center items-center" >
38- < div className = "flex text-center flex-col gap-y-5 max-w-[500px] items-center justify-center" >
39- < Image
40- className = "pt-1"
41- height = { 225 }
42- width = { 287 }
43- src = "empty_nft.svg"
44- alt = "Eye Icon"
45- />
46- < h3 className = "text-[#FFFFFF] font-bold text-[30px]" >
47- There are no NFTs available
48- </ h3 >
49- < p className = "text-[#8E9BAE]" >
50- First make a trade or transaction to view, buy and sell NFTs. Just
51- make a transaction by clicking the button.
52- </ p >
107+ < div className = "my-2 px-8 py-4 rounded-lg" >
108+ < div className = "w-full" >
109+ < div className = "grid grid-cols-5 text-sm text-[#8E9BAE] pb-2" >
110+ < div > Coin</ div >
111+ < div > Price</ div >
112+ < div > Balance</ div >
113+ < div > Value</ div >
114+ < div > Size</ div >
115+ </ div >
53116
54- < Button variant = "primary" icon = "/arrows-exchange.svg" >
55- Trade
56- </ Button >
117+ { tokens . map ( ( token , index ) => (
118+ < div key = { index } className = "grid grid-cols-5 py-4" >
119+ < div className = "flex items-center gap-1" >
120+ < Image
121+ src = { strk }
122+ width = { 20 }
123+ height = { 20 }
124+ alt = "starknet token icon"
125+ />
126+ < span > { token . coin } </ span >
127+ </ div >
128+ < div > { token . price } </ div >
129+ < div > { token . balance } </ div >
130+ < div > { token . value } </ div >
131+ < div >
132+ < div className = "relative w-full h-1 bg-[#292929] rounded-full" >
133+ < div
134+ className = "absolute top-0 left-0 h-1 bg-white rounded-full"
135+ style = { { width : token . size } }
136+ > </ div >
137+ </ div >
138+ < div className = "text-xs mt-1 text-right" > { token . size } </ div >
139+ </ div >
140+ </ div >
141+ ) ) }
57142 </ div >
58143 </ div >
59144 ) }
60145
61146 { activeTab === 'NFT' && (
62- < div className = "p-[20px] relative flex justify-center items-center" >
63- < div className = "flex text-center flex-col gap-y-5 max-w-[500px] items-center justify-center" >
64- < Image
65- className = "pt-1"
66- height = { 225 }
67- width = { 287 }
68- src = "empty_nft.svg"
69- alt = "Eye Icon"
70- />
71- < h3 className = "text-[#FFFFFF] font-bold text-[30px]" >
72- There are no NFTs available
73- </ h3 >
74- < p className = "text-[#8E9BAE]" >
75- First make a trade or transaction to view, buy and sell NFTs. Just
76- make a transaction by clicking the button.
77- </ p >
78-
79- < Button variant = "primary" icon = "/arrows-exchange.svg" >
80- Trade
81- </ Button >
147+ < div className = "p-4" >
148+ < div className = "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4" >
149+ { nfts . map ( ( nft ) => (
150+ < div
151+ key = { nft . id }
152+ className = "rounded-lg overflow-hidden bg-gray-800"
153+ >
154+ < div className = "aspect-square relative" >
155+ < Image
156+ src = { nft . image }
157+ alt = { `NFT ${ nft . id } ` }
158+ fill
159+ className = "object-cover"
160+ />
161+ </ div >
162+ </ div >
163+ ) ) }
82164 </ div >
83165 </ div >
84166 ) }
85- </ >
167+ </ div >
86168 )
87169}
0 commit comments