Skip to content

Commit fa518b8

Browse files
committed
2 parents e790963 + 0d7e401 commit fa518b8

16 files changed

Lines changed: 45 additions & 116 deletions

components/project/CampaignLiveSuccess.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
4949

5050
return (
5151
<div className='max-w-4xl mx-auto space-y-6'>
52-
{/* Success Header */}
5352
<div className='text-center space-y-4'>
5453
<h1 className='text-xl text-[#F5F5F5] mb-2'>Your Campaign is Live!</h1>
5554
<Image src='/check.png' alt='check' className='w-20 h-20 mx-auto' />
@@ -60,7 +59,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
6059
</p>
6160
</div>
6261

63-
{/* Action Buttons */}
6462
<div className='flex gap-4 justify-center'>
6563
<Button
6664
onClick={onBackToDashboard}
@@ -77,15 +75,12 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
7775
</Button>
7876
</div>
7977

80-
{/* Campaign Preview Section */}
8178
<div className='p-6'>
82-
{/* Preview Header */}
8379
<div className='flex items-center justify-between mb-6'>
8480
<h3 className='text-[#F5F5F5] font-medium text-xl'>Preview</h3>
8581
<ChevronUp className='w-5 h-5 text-[#B5B5B5]' />
8682
</div>
8783

88-
{/* Campaign Banner Image */}
8984
<div className='relative w-full h-60 bg-gradient-to-br from-teal-800 to-teal-900 rounded-lg mb-6 flex items-center justify-center'>
9085
<Image
9186
src={campaignDetails.thumbnail}
@@ -95,7 +90,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
9590
/>
9691
</div>
9792

98-
{/* Campaign Title and Status */}
9993
<div className='flex items-center gap-4 mb-4'>
10094
<h2 className='text-[#F5F5F5] text-2xl font-bold'>
10195
{campaignDetails.title}
@@ -105,7 +99,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
10599
</Badge>
106100
</div>
107101

108-
{/* Creator Info */}
109102
<div className='flex items-center space-x-3 mb-6'>
110103
<div className='relative'>
111104
<Image
@@ -124,7 +117,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
124117
</span>
125118
</div>
126119

127-
{/* Financial Metrics */}
128120
<div className='flex justify-between mb-4'>
129121
<div className='text-center'>
130122
<p className='text-[#B5B5B5] text-sm mb-1'>Raised</p>
@@ -140,7 +132,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
140132
</div>
141133
</div>
142134

143-
{/* Progress Bar */}
144135
<div className='mb-6'>
145136
<div className='w-full bg-[#2A2A2A] rounded-full h-2 mb-4'>
146137
<div
@@ -152,7 +143,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
152143
</div>
153144
</div>
154145

155-
{/* Engagement Stats */}
156146
<div className='w-full flex items-center justify-between font-semibold'>
157147
<div className='flex items-center space-x-3'>
158148
<div className='flex items-center space-x-2 bg-[#212121] rounded-lg p-2'>
@@ -183,7 +173,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
183173
</div>
184174
</div>
185175

186-
{/* Campaign Details */}
187176
<div className='mb-6'>
188177
<h4 className='text-[#F5F5F5] font-medium text-lg mb-3'>
189178
Campaign Details
@@ -195,7 +184,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
195184
</div>
196185
</div>
197186

198-
{/* Tags */}
199187
<div className='mb-6'>
200188
<h4 className='text-[#F5F5F5] font-medium text-lg mb-3'>Tags</h4>
201189
<div className='flex space-x-2'>
@@ -207,7 +195,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
207195
</div>
208196
</div>
209197

210-
{/* Campaign Photos */}
211198
<div className='mb-6'>
212199
<h4 className='text-[#F5F5F5] font-medium text-lg mb-3'>
213200
Campaign Photos
@@ -226,7 +213,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
226213
</div>
227214
</div>
228215

229-
{/* Milestones */}
230216
<div className='mb-6'>
231217
<h4 className='text-[#F5F5F5] font-medium text-lg mb-3'>Milestones</h4>
232218
<div className='space-y-2'>
@@ -285,7 +271,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
285271
</div>
286272
</div>
287273

288-
{/* Funding History */}
289274
<div className='mb-6'>
290275
<div className='flex items-center justify-between mb-3 border-t border-[#2A2A2A] pt-4'>
291276
<h4 className='text-[#F5F5F5] font-medium text-lg'>
@@ -311,7 +296,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
311296
</div>
312297
</div>
313298

314-
{/* Action Buttons */}
315299
<div className='flex gap-4 justify-center'>
316300
<Button
317301
onClick={handleShare}
@@ -321,7 +305,6 @@ const CampaignLiveSuccess: React.FC<CampaignLiveSuccessProps> = ({
321305
</Button>
322306
</div>
323307

324-
{/* Share Modal */}
325308
<ShareCampaignModal
326309
open={showShareModal}
327310
onOpenChange={setShowShareModal}

components/project/LaunchCampaignFlow.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const LaunchCampaignFlow: React.FC<LaunchCampaignFlowProps> = ({
2929
const [campaignDetails, setCampaignDetails] =
3030
useState<CampaignDetails | null>(null);
3131

32-
// Wallet protection hook
3332
const {
3433
requireWallet,
3534
showWalletModal,
@@ -39,7 +38,6 @@ const LaunchCampaignFlow: React.FC<LaunchCampaignFlowProps> = ({
3938
actionName: 'launch campaign',
4039
});
4140

42-
// Define the steps for the stepper
4341
const steps = [
4442
{
4543
title: 'Initialize',
@@ -66,15 +64,12 @@ const LaunchCampaignFlow: React.FC<LaunchCampaignFlowProps> = ({
6664
try {
6765
setCurrentStep('launching');
6866

69-
// Launch the campaign
7067
const response = (await launchCampaign(projectId)) as {
7168
data: { campaignId: string };
7269
};
7370

74-
// mock campaign details
7571
setCampaignDetails(mockCampaignDetails as CampaignDetails);
7672

77-
// Update campaign details with the response
7873
if (campaignDetails) {
7974
setCampaignDetails({
8075
...campaignDetails,
@@ -96,7 +91,7 @@ const LaunchCampaignFlow: React.FC<LaunchCampaignFlowProps> = ({
9691
};
9792

9893
const handleLoading = () => {
99-
// Handle loading state if needed
94+
10095
};
10196

10297
const renderContent = () => {
@@ -153,16 +148,15 @@ const LaunchCampaignFlow: React.FC<LaunchCampaignFlowProps> = ({
153148
return (
154149
<>
155150
<div className='flex h-full'>
156-
{/* Left Sidebar with Stepper */}
151+
157152
<div className='flex-1 sticky top-0'>
158153
<Stepper steps={steps} />
159154
</div>
160155

161-
{/* Right Content Area */}
156+
162157
<div className='flex-1'>{renderContent()}</div>
163158
</div>
164159

165-
{/* Wallet Required Modal */}
166160
<WalletRequiredModal
167161
open={showWalletModal}
168162
onOpenChange={closeWalletModal}

components/project/MilestoneSubmissionModal.tsx

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
5151
const [focusedInput, setFocusedInput] = useState<number | null>(null);
5252
const [showSuccess, setShowSuccess] = useState(false);
5353

54-
// Wallet protection hook
5554
const {
5655
requireWallet,
5756
showWalletModal,
@@ -72,7 +71,6 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
7271

7372
const handleExternalLinkChange = (index: number, value: string) => {
7473
const newLinks = [...externalLinks];
75-
// Ensure the value starts with "www."
7674
if (!value.startsWith('www.')) {
7775
newLinks[index] = 'www.' + value;
7876
} else {
@@ -82,7 +80,6 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
8280
};
8381

8482
const handleSaveLink = () => {
85-
// Add a new field with "www."
8683
setExternalLinks(prev => [...prev, 'www.']);
8784
};
8885

@@ -124,7 +121,6 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
124121
/>
125122
) : (
126123
<div className='space-y-6'>
127-
{/* Milestone Header */}
128124
<div className='flex justify-center'>
129125
<div className='text-left' style={{ width: '500px' }}>
130126
<h2 className='text-xl font-semibold text-white mb-2'>
@@ -134,7 +130,6 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
134130
</div>
135131
</div>
136132

137-
{/* Milestone Card - Centered */}
138133
<div className='flex justify-center'>
139134
<div
140135
className='bg-[#1C1C1C] border border-[#2B2B2B] rounded-[12px]'
@@ -189,7 +184,6 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
189184
</div>
190185
</div>
191186

192-
{/* File Upload Section */}
193187
<div className='flex justify-center'>
194188
<div className='space-y-3' style={{ width: '500px' }}>
195189
<h3 className='text-white font-medium text-lg'>
@@ -243,10 +237,8 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
243237
/>
244238
</div>
245239

246-
{/* Uploaded Files Section */}
247240
{files.length > 0 && (
248241
<div className='space-y-3'>
249-
{/* Header with count */}
250242
<div className='flex items-center gap-2'>
251243
<h3 className='text-white font-medium'>Uploaded Files</h3>
252244
<div className='w-6 h-6 rounded-full bg-[#1C1C1C] border border-white flex items-center justify-center'>
@@ -256,20 +248,17 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
256248
</div>
257249
</div>
258250

259-
{/* Files List */}
260251
<div className='space-y-2'>
261252
{files.map((file, index) => (
262253
<div
263254
key={index}
264255
className='flex items-center justify-between bg-[#1C1C1C] border border-[#2B2B2B] rounded-lg p-3'
265256
>
266257
<div className='flex items-center gap-3'>
267-
{/* Green check circle */}
268258
<div className='w-6 h-6 rounded-full bg-green-500 flex items-center justify-center'>
269259
<Check className='w-3 h-3 text-white' />
270260
</div>
271261

272-
{/* File info */}
273262
<div className='flex flex-col'>
274263
<span className='text-white text-sm font-medium'>
275264
{file.name}
@@ -286,7 +275,6 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
286275
</div>
287276
</div>
288277

289-
{/* Red trash button */}
290278
<button
291279
onClick={() => handleRemoveFile(index)}
292280
className='w-8 h-8 rounded-lg bg-red-500 hover:bg-red-600 flex items-center justify-center transition-colors'
@@ -301,7 +289,6 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
301289
</div>
302290
</div>
303291

304-
{/* External Links Section */}
305292
<div className='flex justify-center'>
306293
<div className='space-y-3' style={{ width: '500px' }}>
307294
<Label className='text-white font-medium'>
@@ -344,7 +331,6 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
344331
className='placeholder:text-gray-400'
345332
/>
346333

347-
{/* Save button - only show when there's more text than just "www." */}
348334
{link.trim() && link !== 'www.' && (
349335
<BoundlessButton
350336
className='absolute right-2 top-1/2 transform -translate-y-1/2 w-[65px] h-[36px] rounded-[10px] border-[0.3px] border-[#A7F950] bg-[#A7F950] text-black text-[14px] font-[500] transition-colors'
@@ -362,8 +348,7 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
362348
))}
363349
</div>
364350
</div>
365-
366-
{/* Submit Button */}
351+
367352
<div className='flex justify-center'>
368353
<BoundlessButton
369354
onClick={handleSubmit}
@@ -387,7 +372,6 @@ const MilestoneSubmissionModal: React.FC<MilestoneSubmissionModalProps> = ({
387372
</div>
388373
)}
389374

390-
{/* Wallet Required Modal */}
391375
<WalletRequiredModal
392376
open={showWalletModal}
393377
onOpenChange={closeWalletModal}

components/project/MilestoneSubmissionPage.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const MilestoneSubmissionPage: React.FC<MilestoneSubmissionPageProps> = ({
4343
const [isExpanded, setIsExpanded] = useState(true);
4444
const [additionalNotes, setAdditionalNotes] = useState('');
4545

46-
// Wallet protection hook
4746
const {
4847
requireWallet,
4948
showWalletModal,
@@ -174,7 +173,6 @@ const MilestoneSubmissionPage: React.FC<MilestoneSubmissionPageProps> = ({
174173
)}
175174
</div>
176175

177-
{/* File Upload Section */}
178176
<div className='bg-[#1C1C1C] border border-[#2B2B2B] rounded-xl p-6 space-y-4 self-start w-full max-w-2xl'>
179177
<div>
180178
<Label className='text-white font-medium text-lg'>
@@ -220,7 +218,6 @@ const MilestoneSubmissionPage: React.FC<MilestoneSubmissionPageProps> = ({
220218
/>
221219
</div>
222220

223-
{/* Uploaded Files List */}
224221
{files.length > 0 && (
225222
<div className='space-y-3'>
226223
<h4 className='text-white font-medium'>Uploaded Files</h4>
@@ -252,7 +249,6 @@ const MilestoneSubmissionPage: React.FC<MilestoneSubmissionPageProps> = ({
252249
)}
253250
</div>
254251

255-
{/* External Links Section */}
256252
<div className='bg-[#1C1C1C] border border-[#2B2B2B] rounded-xl p-6 space-y-4 self-start w-full max-w-2xl'>
257253
<div>
258254
<Label className='text-white font-medium text-lg'>
@@ -297,7 +293,6 @@ const MilestoneSubmissionPage: React.FC<MilestoneSubmissionPageProps> = ({
297293
</BoundlessButton>
298294
</div>
299295

300-
{/* Additional Notes Section */}
301296
<div className='bg-[#1C1C1C] border border-[#2B2B2B] rounded-xl p-6 space-y-4 self-start w-full max-w-2xl'>
302297
<div>
303298
<Label className='text-white font-medium text-lg'>
@@ -324,9 +319,7 @@ const MilestoneSubmissionPage: React.FC<MilestoneSubmissionPageProps> = ({
324319
</div>
325320
</div>
326321

327-
{/* Sidebar */}
328322
<div className='space-y-6'>
329-
{/* Submission Summary */}
330323
<div className='bg-[#1C1C1C] border border-[#2B2B2B] rounded-xl p-6'>
331324
<h3 className='text-white font-semibold text-lg mb-4'>
332325
Submission Summary
@@ -354,7 +347,6 @@ const MilestoneSubmissionPage: React.FC<MilestoneSubmissionPageProps> = ({
354347
</div>
355348
</div>
356349

357-
{/* Guidelines */}
358350
<div className='bg-[#1C1C1C] border border-[#2B2B2B] rounded-xl p-6'>
359351
<h3 className='text-white font-semibold text-lg mb-4'>
360352
Submission Guidelines
@@ -387,7 +379,6 @@ const MilestoneSubmissionPage: React.FC<MilestoneSubmissionPageProps> = ({
387379
</div>
388380
</div>
389381

390-
{/* Submit Button */}
391382
<div className='mt-8 pt-6 border-t border-[#2B2B2B] w-full max-w-2xl mx-auto'>
392383
<div className='flex items-center justify-between'>
393384
<BoundlessButton variant='outline' onClick={onBack} size='lg'>
@@ -407,7 +398,6 @@ const MilestoneSubmissionPage: React.FC<MilestoneSubmissionPageProps> = ({
407398
</div>
408399
</div>
409400

410-
{/* Wallet Required Modal */}
411401
<WalletRequiredModal
412402
open={showWalletModal}
413403
onOpenChange={closeWalletModal}

0 commit comments

Comments
 (0)