Skip to content

Commit 40e5459

Browse files
committed
Merge branch 'Staging_T1' of https://github.com/ava-labs/builders-hub into insomnia/staging
2 parents 000ac5c + 592f6bd commit 40e5459

File tree

4 files changed

+100
-105
lines changed

4 files changed

+100
-105
lines changed

components/ambassador-dao/How-it-works.tsx

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
'use client';
1+
"use client";
22

3-
import React, { useState } from 'react';
4-
import { ListChecks } from 'lucide-react';
5-
import { AuthModal } from './sections/auth-modal';
3+
import React, { useState } from "react";
4+
import { ListChecks } from "lucide-react";
5+
import { AuthModal } from "./sections/auth-modal";
66

77
interface Step {
88
number: number;
@@ -16,42 +16,40 @@ interface HowItWorksProps {
1616
}
1717

1818
const HowItWorks: React.FC<HowItWorksProps> = ({ steps }) => {
19-
20-
const [openAuthModal, setOpenAuthModal] = useState(false);
21-
19+
const [openAuthModal, setOpenAuthModal] = useState(false);
2220

2321
return (
24-
<div className="dark:bg-black bg-white text-[var(--white-text-color)] py-8">
25-
<div className="mx-auto">
26-
<div className="flex items-center mb-6 gap-2">
27-
<ListChecks color="var(--white-text-color)" />
28-
<h2 className="text-lg font-medium ml-1">How It Works</h2>
22+
<div className='dark:bg-black bg-white text-[var(--white-text-color)] py-8'>
23+
<div className='mx-auto'>
24+
<div className='flex items-center mb-6 gap-2'>
25+
<ListChecks color='var(--white-text-color)' />
26+
<h2 className='text-lg font-medium ml-1'>How It Works</h2>
2927
</div>
3028

31-
<div className="relative">
29+
<div className='relative'>
3230
<svg
33-
className="absolute top-0 h-full z-5 pl-8"
34-
width="70"
35-
preserveAspectRatio="none"
31+
className='absolute top-0 h-full z-5 pl-8'
32+
width='70'
33+
preserveAspectRatio='none'
3634
style={{ height: "calc(100% - 20px)" }}
3735
>
3836
<path
39-
d="M4,0 C24,50 50,100 30,124 C1,200 30,250 40,300 C50,350 30,400 40,450"
40-
fill="none"
41-
stroke="var(--white-text-color)"
42-
strokeWidth="2"
43-
strokeDasharray="8,8"
44-
strokeLinecap="round"
37+
d='M4,0 C24,50 50,100 30,124 C1,200 30,250 40,300 C50,350 30,400 40,450'
38+
fill='none'
39+
stroke='var(--white-text-color)'
40+
strokeWidth='2'
41+
strokeDasharray='8,8'
42+
strokeLinecap='round'
4543
/>
4644
</svg>
4745

48-
<div className="space-y-5 relative mb-8">
46+
<div className='space-y-5 relative mb-8'>
4947
{steps.map((step, index) => (
5048
<div
5149
key={step.number}
52-
className="flex items-center gap-4 relative bg-card-grad rounded-md shadow-md pl-10"
50+
className='flex items-center gap-4 relative bg-card-grad rounded-md shadow-md pl-10'
5351
>
54-
<div className="w-9 h-9 bg-white rounded-full flex items-center justify-center text-black text-xl font-semibold z-10">
52+
<div className='w-9 h-9 bg-white rounded-full flex items-center justify-center text-black text-xl font-semibold z-10'>
5553
{step.number}
5654
</div>
5755

@@ -61,10 +59,10 @@ const [openAuthModal, setOpenAuthModal] = useState(false);
6159
} rounded-lg py-6 px-2 min-h-[80px] flex items-center text-wrap`}
6260
onClick={() => step.number === 1 && setOpenAuthModal(true)}
6361
>
64-
<h3 className="text-base font-medium dark:text-white text-black">
62+
<h3 className='text-base font-medium dark:text-white text-black'>
6563
{step.title}
6664
{step.linkText && (
67-
<span className="ml-2 underline">{step.linkText}</span>
65+
<span className='ml-2 underline'>{step.linkText}</span>
6866
)}
6967
</h3>
7068
</div>

components/ambassador-dao/dashboard/BountiesSection.tsx

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ const BountiesSection = ({
5555
};
5656

5757
return (
58-
<section className="border border-[var(--default-border-color)] rounded-md py-10 px-6 mb-12">
59-
<div className="flex justify-between">
60-
<h2 className="text-3xl font-medium mb-6 flex items-center gap-2">
61-
<Lightbulb size={36} color="var(--white-text-color)" /> Bounties
58+
<section className='border border-[var(--default-border-color)] rounded-md py-10 px-6 mb-12'>
59+
<div className='flex justify-between'>
60+
<h2 className='text-3xl font-medium mb-6 flex items-center gap-2'>
61+
<Lightbulb size={36} color='var(--white-text-color)' /> Bounties
6262
</h2>
63-
{data?.length > 0 && <ViewAllButton type="bounties" />}
63+
{data?.length > 0 && <ViewAllButton type='bounties' />}
6464
</div>
65-
<div className="grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6 w-full">
65+
<div className='grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6 w-full'>
6666
<FilterDropdown
6767
label={filters.sort_direction}
6868
options={sortOrderTypes}
@@ -71,38 +71,37 @@ const BountiesSection = ({
7171
/>
7272

7373
<FilterDropdown
74-
label="Skill Set"
74+
label='Skill Set'
7575
options={skills}
7676
value={filters.skill_ids}
7777
onValueChange={(value) => updateFilters({ skill_ids: value })}
7878
/>
7979

80-
<span
81-
className="flex cursor-pointer rounded-lg px-4 py-2 text-[var(--default-text-color)] items-center border dark:border-[var(--default-text-color)] text-sm"
82-
onClick={clearAllFilters}
83-
>
84-
Reset Filters
85-
</span>
86-
80+
<span
81+
className='flex cursor-pointer rounded-lg px-4 py-2 text-[var(--default-text-color)] items-center border dark:border-[var(--default-text-color)] text-sm'
82+
onClick={clearAllFilters}
83+
>
84+
Reset Filters
85+
</span>
8786

8887
{/* Search input */}
89-
<div className="relative">
88+
<div className='relative'>
9089
<input
91-
type="text"
92-
placeholder="Search"
90+
type='text'
91+
placeholder='Search'
9392
value={searchInput}
9493
onChange={handleSearchChange}
95-
className="text-sm h-10 text-[var(--white-text-color)] border border-[var(--default-border-color)] rounded-md px-4 py-2 focus:outline-none w-full"
94+
className='text-sm h-10 text-[var(--white-text-color)] border border-[var(--default-border-color)] rounded-md px-4 py-2 focus:outline-none w-full'
9695
/>
97-
<button className="absolute right-3 top-1/2 transform -translate-y-1/2">
98-
<Search color="#9F9FA9" className="h-3 w-3 sm:w-5 sm:h-5" />
96+
<button className='absolute right-3 top-1/2 transform -translate-y-1/2'>
97+
<Search color='#9F9FA9' className='h-3 w-3 sm:w-5 sm:h-5' />
9998
</button>
10099
</div>
101100
</div>
102101

103-
<div className="space-y-4">
102+
<div className='space-y-4'>
104103
{isLoading && (
105-
<div className="flex items-center justify-center h-[400px] py-14 mb-12">
104+
<div className='flex items-center justify-center h-[400px] py-14 mb-12'>
106105
<Loader />
107106
</div>
108107
)}
@@ -113,9 +112,9 @@ const BountiesSection = ({
113112

114113
{!isLoading && data?.length === 0 && (
115114
<EmptyState
116-
title="No Bounty Matches Your Filters"
117-
description="Try adjusting criteria"
118-
className="mt-8"
115+
title='No Bounty Matches Your Filters'
116+
description='Try adjusting criteria'
117+
className='mt-8'
119118
/>
120119
)}
121120
</div>

components/ambassador-dao/ui/FileUploader.tsx

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { Upload, X, FileText, Loader2 } from "lucide-react";
44
type FileUploaderProps = {
55
files?: File[] | File | null;
66
setFiles?: React.Dispatch<React.SetStateAction<File[]>>;
7-
handleFileUpload: any
7+
handleFileUpload: any;
88
removeFile?: any;
9-
9+
1010
singleFile?: boolean;
1111
previewUrl?: string | null;
1212
fileName?: string;
13-
13+
1414
isUploading?: boolean;
1515
accept: string;
1616
maxFiles?: number;
@@ -45,7 +45,7 @@ const FileUploader: React.FC<FileUploaderProps> = ({
4545
maxSize = "Max 1 MB files are allowed",
4646
allowedFileTypes,
4747
height = "h-32",
48-
fileSize
48+
fileSize,
4949
}) => {
5050
const handleDragOver = (e: React.DragEvent<HTMLDivElement>) => {
5151
e.preventDefault();
@@ -70,35 +70,35 @@ const FileUploader: React.FC<FileUploaderProps> = ({
7070
if (!files || !Array.isArray(files) || files.length === 0) return null;
7171

7272
return (
73-
<div className="w-full mb-4">
73+
<div className='w-full mb-4'>
7474
{files.map((file, index) => (
7575
<div
7676
key={index}
77-
className="flex items-center justify-between p-3 border border-[var(--default-border-color)] rounded-md mb-2"
77+
className='flex items-center justify-between p-3 border border-[var(--default-border-color)] rounded-md mb-2'
7878
>
79-
<div className="flex items-center">
79+
<div className='flex items-center'>
8080
<FileText
81-
className="h-5 w-5 mr-2"
82-
color="var(--white-text-color)"
81+
className='h-5 w-5 mr-2'
82+
color='var(--white-text-color)'
8383
/>
84-
<div className="text-sm">
85-
<p className="text-[var(--primary-text-color)] font-medium">
84+
<div className='text-sm'>
85+
<p className='text-[var(--primary-text-color)] font-medium'>
8686
{file.name}
8787
</p>
88-
<p className="text-xs text-[var(--secondary-text-color)]">
88+
<p className='text-xs text-[var(--secondary-text-color)]'>
8989
{Math.round(file.size / 1024)}kb
9090
</p>
9191
</div>
9292
</div>
9393
<button
94-
type="button"
94+
type='button'
9595
onClick={(e) => {
9696
e.stopPropagation();
9797
removeFile(index);
9898
}}
99-
className="text-gray-500 hover:text-gray-700"
99+
className='text-gray-500 hover:text-gray-700'
100100
>
101-
<X className="h-4 w-4" color="var(--white-text-color)" />
101+
<X className='h-4 w-4' color='var(--white-text-color)' />
102102
</button>
103103
</div>
104104
))}
@@ -111,36 +111,36 @@ const FileUploader: React.FC<FileUploaderProps> = ({
111111

112112
return (
113113
<div
114-
className="rounded-md my-2 flex flex-col border border-[var(--default-border-color)] p-3 text-sm cursor-pointer"
114+
className='rounded-md my-2 flex flex-col border border-[var(--default-border-color)] p-3 text-sm cursor-pointer'
115115
onClick={() => document.getElementById(inputId)?.click()}
116116
>
117117
{previewUrl && (
118-
<div className="rounded flex items-center overflow-hidden relative">
119-
<div className="flex gap-3">
118+
<div className='rounded flex items-center overflow-hidden relative'>
119+
<div className='flex gap-3'>
120120
<img
121121
src={previewUrl}
122-
alt="File preview"
123-
className="object-cover w-12 h-12 rounded-full"
122+
alt='File preview'
123+
className='object-cover w-12 h-12 rounded-full'
124124
/>
125-
<div className="flex flex-col">
126-
<span className="truncate">{fileName}</span>
127-
<p className="text-xs text-left text-[var(--secondary-text-color)]">
125+
<div className='flex flex-col'>
126+
<span className='truncate'>{fileName}</span>
127+
<p className='text-xs text-left text-[var(--secondary-text-color)]'>
128128
{fileSize && `${Math.round(fileSize / 1024)}kb`}
129129
</p>
130130
</div>
131131
</div>
132132
<X
133133
onClick={(e) => {
134-
e.stopPropagation()
135-
removeFile?.(previewUrl)
134+
e.stopPropagation();
135+
removeFile?.(previewUrl);
136136
}}
137-
className="h-4 w-4 flex justify-end absolute right-0 top-0 z-50"
138-
color="var(--white-text-color)"
137+
className='h-4 w-4 flex justify-end absolute right-0 top-0 z-50'
138+
color='var(--white-text-color)'
139139
/>
140140
<input
141-
type="file"
141+
type='file'
142142
accept={accept}
143-
className="hidden"
143+
className='hidden'
144144
id={inputId}
145145
onChange={(e) => {
146146
if (e.target.files && e.target.files.length > 0) {
@@ -149,8 +149,6 @@ const FileUploader: React.FC<FileUploaderProps> = ({
149149
}
150150
}}
151151
/>
152-
153-
154152
</div>
155153
)}
156154
</div>
@@ -175,23 +173,23 @@ const FileUploader: React.FC<FileUploaderProps> = ({
175173
>
176174
{isUploading ? (
177175
<Loader2
178-
className="animate-spin"
176+
className='animate-spin'
179177
size={24}
180-
color="var(--white-text-color)"
178+
color='var(--white-text-color)'
181179
/>
182180
) : (
183181
<>
184182
<Upload
185183
size={24}
186-
className="text-[#6b6b74] dark:text-[#A1A1AA] mb-2"
187-
color="var(--white-text-color)"
184+
className='text-[#6b6b74] dark:text-[#A1A1AA] mb-2'
185+
color='var(--white-text-color)'
188186
/>
189-
<p className="text-sm text-[#6b6b74] dark:text-[#A1A1AA]">
187+
<p className='text-sm text-[#6b6b74] dark:text-[#A1A1AA]'>
190188
Drag your file(s) or{" "}
191189
<input
192-
type="file"
190+
type='file'
193191
accept={accept}
194-
className="hidden"
192+
className='hidden'
195193
id={inputId}
196194
multiple={!singleFile}
197195
onChange={(e) => {
@@ -208,14 +206,14 @@ const FileUploader: React.FC<FileUploaderProps> = ({
208206
/>
209207
<label
210208
htmlFor={inputId}
211-
className="text-[var(--primary-text-color)] underline cursor-pointer ml-1"
209+
className='text-[var(--primary-text-color)] underline cursor-pointer ml-1'
212210
onClick={(e) => e.stopPropagation()}
213211
>
214212
browse
215213
</label>
216214
</p>
217215
{(maxSize || allowedFileTypes) && (
218-
<p className="text-xs text-[#6b6b74] dark:text-[#A1A1AA] mt-1">
216+
<p className='text-xs text-[#6b6b74] dark:text-[#A1A1AA] mt-1'>
219217
{maxSize} {allowedFileTypes ? `(${allowedFileTypes})` : ""}
220218
</p>
221219
)}
@@ -226,22 +224,22 @@ const FileUploader: React.FC<FileUploaderProps> = ({
226224
};
227225

228226
return (
229-
<div className="mb-6">
227+
<div className='mb-6'>
230228
{label && (
231-
<label className="block text-sm">
229+
<label className='block text-sm'>
232230
{label}
233-
{required && <span className="text-[#FB2C36]">*</span>}
231+
{required && <span className='text-[#FB2C36]'>*</span>}
234232
</label>
235233
)}
236234

237235
{recommendedSize && (
238-
<p className="text-xs text-[#6b6b74] dark:text-[#A1A1AA] mb-2">
236+
<p className='text-xs text-[#6b6b74] dark:text-[#A1A1AA] mb-2'>
239237
{recommendedSize}
240238
</p>
241239
)}
242240

243241
{description && (
244-
<p className="text-xs text-[#6b6b74] dark:text-[#A1A1AA] mb-2">
242+
<p className='text-xs text-[#6b6b74] dark:text-[#A1A1AA] mb-2'>
245243
{description}
246244
</p>
247245
)}

0 commit comments

Comments
 (0)