Skip to content

Commit 6eaeef4

Browse files
committed
fix/ carousel distribution correctly
1 parent 002d225 commit 6eaeef4

5 files changed

Lines changed: 120 additions & 35 deletions

File tree

dev-config.json

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,35 @@
11
{
22
"RSK_NODE": "https://public-node.testnet.rsk.co",
33
"SOLVE_CAPTCHA_URL": "https://www.google.com/recaptcha/api/siteverify",
4-
"SECRET_VERIFY_CAPTCHA": "",
5-
"SITE_KEY_CAPTCHA": "",
6-
"FAUCET_ADDRESS": "",
7-
"FAUCET_PRIVATE_KEY": "",
4+
"SECRET_VERIFY_CAPTCHA": "6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe",
5+
"SITE_KEY_CAPTCHA": "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI",
6+
"FAUCET_ADDRESS": "0xff54A7563fc6bB7A34Ca66B41265f7f7D61b3a7D",
7+
"FAUCET_PRIVATE_KEY": "75207714a34f735a85ab79918eb310f706c0d2944ab8f7d6d9811c88708fe004",
88
"GAS_PRICE": 60000000,
99
"GAS_LIMIT": 100000,
1010
"VALUE_TO_DISPENSE": 0.0005,
1111
"PROMO_VALUE_TO_DISPENSE": 0.05,
1212
"TAG_MANAGER_ID": "NO_ID",
1313
"FILTER_BY_IP": true,
1414
"TIMER_LIMIT": 180000,
15-
"PROMO_CODE": []
15+
"PROMO_CODE": [
16+
{
17+
"code": "ESP_01",
18+
"activationDate": "2025-01-01",
19+
"expirationDate": "2025-12-10",
20+
"maxDispensableRBTC": 1
21+
},
22+
{
23+
"code": "ESP_02",
24+
"activationDate": "2024-01-01",
25+
"expirationDate": "2024-12-10",
26+
"maxDispensableRBTC": 1
27+
},
28+
{
29+
"code": "ESP_03",
30+
"activationDate": "2025-07-07",
31+
"expirationDate": "2025-12-10",
32+
"maxDispensableRBTC": 1
33+
}
34+
]
1635
}

src/app/lib/faucetHistory.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"0x782A6fC6986D40bbeA0c01b1A7f24281f8b905Ed": {
3+
"address": "0x782A6fC6986D40bbeA0c01b1A7f24281f8b905Ed",
4+
"ip": "186.105.22.24",
5+
"time": "2025-01-22T13:15:37.815Z",
6+
"promoCode": "",
7+
"loading": false,
8+
"mint": true
9+
},
10+
"0x769fbacda24887221555b6f4794847bead857ad3": {
11+
"address": "0x769fbacda24887221555b6f4794847bead857ad3",
12+
"ip": "186.105.22.24",
13+
"time": "2025-01-22T14:05:42.019Z",
14+
"promoCode": "ESP_01",
15+
"loading": false,
16+
"mint": true
17+
}
18+
}

src/components/Carousel.tsx

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,36 @@ const Carousel = () => {
4545
return (
4646
<div className="content-carousel">
4747
<Swiper
48-
modules={[Autoplay, Pagination]} // Carga los módulos aquí
49-
spaceBetween={30}
50-
slidesPerView={1}
48+
modules={[Autoplay, Pagination]}
5149
autoplay={{ delay: 5000, disableOnInteraction: false }}
5250
pagination={{ clickable: true }}
51+
52+
breakpoints={{
53+
480: {
54+
slidesPerView: 1.1,
55+
spaceBetween: 5,
56+
},
57+
768: {
58+
slidesPerView: 1.15,
59+
spaceBetween: 10,
60+
},
61+
1024: {
62+
slidesPerView: 1.3,
63+
spaceBetween: 15,
64+
},
65+
1440: {
66+
slidesPerView: 1.5,
67+
spaceBetween: 20,
68+
},
69+
1920: {
70+
slidesPerView: 1.8,
71+
spaceBetween: 20,
72+
},
73+
2560: {
74+
slidesPerView: 2,
75+
spaceBetween: 40,
76+
}
77+
}}
5378
>
5479
{items.map((item, i) => (
5580
<SwiperSlide key={i}>

src/styles/_content.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
}
1414
}
1515
.content-form {
16+
margin-right: 20px;
1617
.title-form {
1718
color: $white1;
1819
font-size: 18px;
@@ -44,7 +45,6 @@
4445
.faucet-form {
4546
position: relative;
4647
z-index: 0;
47-
margin-right: 200px;
4848
display: flex;
4949
flex-direction: column;
5050
justify-content: space-between;
@@ -107,7 +107,11 @@
107107

108108
.content-carousel {
109109
position: relative;
110-
width: 450px;
110+
width: 100%;
111+
max-width: 600px;
112+
display: flex;
113+
justify-content: center;
114+
align-items: center;
111115
.rsk-card {
112116
background-color: $bg1-color;
113117
width: 400px;

src/styles/_responsive.scss

Lines changed: 44 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
}
1010
}
1111
.content-form {
12+
margin-right: 20px;
1213
.title-form {
1314
font-size: 14px;
1415
}
15-
.faucet-form {
16-
margin-right: 180px;
17-
}
1816
}
1917
.content-carousel {
2018
width: 410px;
@@ -40,9 +38,7 @@
4038

4139
@include laptop {
4240
.content-form {
43-
.faucet-form {
44-
margin-right: 90px;
45-
}
41+
margin-right: 20px;
4642
}
4743
.content-carousel {
4844
width: 450px;
@@ -58,30 +54,42 @@
5854
font-size: 35px;
5955
}
6056
.content-form {
61-
width: 90%;
57+
width: 100%;
6258
max-width: 400px;
59+
display: flex;
60+
flex-direction: column;
61+
align-items: center;
62+
justify-content: center;
63+
margin-right: 0px;
6364
}
6465
.container-faucet {
6566
display: flex;
66-
flex-direction: column-reverse;
67+
flex-direction: column;
6768
align-items: center;
6869
justify-content: center;
69-
flex-wrap: wrap;
70+
width: 100%;
71+
max-width: 400px;
72+
margin: 40px auto;
7073
gap: 20px;
74+
}
75+
.content-carousel {
7176
width: 100%;
72-
text-align: center;
73-
margin-top: 40px;
77+
margin-left: 0px;
78+
max-width: 400px;
79+
display: flex;
80+
align-items: center;
81+
justify-content: center;
82+
}
83+
.swiper {
84+
width: 100% !important;
85+
max-width: 400px !important;
7486
}
7587
.container {
7688
.content-message {
7789
margin: 30px auto 0px auto;
7890
width: 70%;
7991
}
8092
}
81-
.content-carousel {
82-
width: 100%;
83-
max-width: 400px;
84-
}
8593
footer {
8694
flex-direction: column;
8795
.links {
@@ -109,23 +117,27 @@
109117
}
110118
}
111119
.content-form {
112-
width: 90%;
113-
max-width: 350px;
120+
width: 100%;
121+
max-width: 400px;
122+
display: flex;
123+
flex-direction: column;
124+
align-items: center;
125+
justify-content: center;
126+
margin-right: 0px;
114127
}
115128
.rsk-card {
116129
width: 280px;
117130
height: 160px;
118131
}
119132
.container-faucet {
120133
display: flex;
121-
flex-direction: column-reverse;
134+
flex-direction: column;
122135
align-items: center;
123136
justify-content: center;
124-
flex-wrap: wrap;
125-
gap: 15px;
126137
width: 100%;
127-
text-align: center;
128-
margin-top: 30px;
138+
max-width: 350px;
139+
margin: 30px auto;
140+
gap: 15px;
129141
}
130142
.container {
131143
.content-message {
@@ -134,8 +146,15 @@
134146
}
135147
}
136148
.content-carousel {
137-
display: block;
138-
width: 90%;
139-
max-width: 350px;
149+
width: 100%;
150+
max-width: 450px;
151+
margin-left: 0px;
152+
display: flex;
153+
align-items: center;
154+
justify-content: center;
155+
}
156+
.swiper {
157+
width: 100% !important;
158+
max-width: 450px !important;
140159
}
141160
}

0 commit comments

Comments
 (0)