Skip to content

Commit 5eed105

Browse files
authored
Minor fixes (#147)
* feat: initialize back project flow and project history demo page * fix: implement back project form * fix: fix back project flow * feat: backing history * fix: link backing history flow * fix: lint back project flow * fix: remove flows folder * fix: use same colors from figma * fix: fix responsive designs * fix: fix responsive designs
1 parent 9e619ec commit 5eed105

12 files changed

Lines changed: 352 additions & 1671 deletions

File tree

components/campaigns/CampaignSummary.tsx

Lines changed: 220 additions & 204 deletions
Large diffs are not rendered by default.

components/campaigns/CampaignTable.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ const CampaignRow = ({
156156
>
157157
{campaign.status === 'live' && (
158158
<>
159+
<DropdownMenuItem
160+
onClick={() => handleAction('back-project')}
161+
className='text-white font-medium hover:!text-white text-sm py-2 px-3 rounded-md hover:!bg-[#2B2B2B] hover:shadow-[0_1px_4px_0_rgba(40,45,40,0.04),_0_0_24px_1px_rgba(10,15,10,0.14)] transition-colors duration-200 cursor-pointer'
162+
>
163+
Back Project
164+
</DropdownMenuItem>
159165
<DropdownMenuItem
160166
onClick={() => handleAction('share')}
161167
className='text-white font-medium hover:!text-white text-sm py-2 px-3 rounded-md hover:!bg-[#2B2B2B] hover:shadow-[0_1px_4px_0_rgba(40,45,40,0.04),_0_0_24px_1px_rgba(10,15,10,0.14)] transition-colors duration-200 cursor-pointer'

components/campaigns/back-project/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useState } from 'react';
44
import { BoundlessButton } from '@/components/buttons';
55
import { ProjectSubmissionSuccess } from '@/components/project';
66
import BoundlessSheet from '@/components/sheet/boundless-sheet';
7-
import { ProjectSubmissionLoading } from '@/components/flows/back-project/project-submission-loading';
7+
import { ProjectSubmissionLoading } from './project-submission-loading';
88
import { BackProjectForm } from './back-project-form';
99

1010
type BackProjectState = 'form' | 'loading' | 'success';

components/campaigns/backing-history/backing-history-table.tsx

Lines changed: 56 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -36,67 +36,69 @@ const BackingHistoryTable: React.FC<BackingHistoryTableProps> = ({
3636
};
3737

3838
return (
39-
<>
40-
{/* Results Header */}
41-
<div className='grid grid-cols-3 gap-5 text-sm font-medium text-muted-foreground border-b border-muted-foreground/20 pb-2 mt-10 mb-0'>
42-
<div>Backer</div>
43-
<div className='pl-20'>Amount</div>
44-
<div className='pl-20'>Date</div>
45-
</div>
39+
<div className='overflow-x-auto'>
40+
<div className='min-w-[600px]'>
41+
{/* Results Header */}
42+
<div className='grid grid-cols-3 gap-5 text-sm font-medium text-muted-foreground border-b border-muted-foreground/20 pb-2 mt-10 mb-0'>
43+
<div>Backer</div>
44+
<div className='pl-20'>Amount</div>
45+
<div className='pl-20'>Date</div>
46+
</div>
4647

47-
{/* Backing List */}
48-
<div className=''>
49-
{backers.map(backer => (
50-
<div
51-
key={backer.id}
52-
className='grid grid-cols-3 gap-4 items-center border-b border-muted-foreground/20 py-5 hover:bg-muted/10 px-2 transition-colors'
53-
>
54-
<div className='flex items-center gap-3'>
55-
<div className='relative w-10 h-10'>
56-
<Avatar className='w-10 h-10'>
57-
<AvatarImage src={backer.avatar || '/placeholder.svg'} />
58-
<AvatarFallback
59-
className={
60-
backer.isAnonymous ? 'bg-green-600' : 'bg-blue-600'
61-
}
62-
>
63-
{backer.isAnonymous ? (
64-
<User className='w-4 h-4' />
65-
) : (
66-
backer.name.charAt(0)
67-
)}
68-
</AvatarFallback>
69-
</Avatar>
70-
<div className='absolute -bottom-0.5 -right-0.5 w-4 h-4 bg-[#2B2B2B] border border-[#2B2B2B] rounded-full flex items-center justify-center'>
71-
<CheckIcon className='w-2.5 h-2.5 text-[#787878]' />
72-
</div>
73-
</div>
74-
<div>
75-
<div className='text-white font-medium whitespace-nowrap'>
76-
{backer.name}
48+
{/* Backing List */}
49+
<div className=''>
50+
{backers.map(backer => (
51+
<div
52+
key={backer.id}
53+
className='grid grid-cols-3 gap-4 items-center border-b border-muted-foreground/20 py-5 hover:bg-muted/10 px-2 transition-colors'
54+
>
55+
<div className='flex items-center gap-3'>
56+
<div className='relative w-10 h-10'>
57+
<Avatar className='w-10 h-10'>
58+
<AvatarImage src={backer.avatar || '/placeholder.svg'} />
59+
<AvatarFallback
60+
className={
61+
backer.isAnonymous ? 'bg-green-600' : 'bg-blue-600'
62+
}
63+
>
64+
{backer.isAnonymous ? (
65+
<User className='w-4 h-4' />
66+
) : (
67+
backer.name.charAt(0)
68+
)}
69+
</AvatarFallback>
70+
</Avatar>
71+
<div className='absolute -bottom-0.5 -right-0.5 w-4 h-4 bg-[#2B2B2B] border border-[#2B2B2B] rounded-full flex items-center justify-center'>
72+
<CheckIcon className='w-2.5 h-2.5 text-[#787878]' />
73+
</div>
7774
</div>
78-
<div className='text-xs text-muted-foreground flex items-center gap-1'>
79-
<Wallet className='w-4 h-4 text-lg' />
80-
{backer.walletId}
75+
<div>
76+
<div className='text-white font-medium whitespace-nowrap'>
77+
{backer.name}
78+
</div>
79+
<div className='text-xs text-muted-foreground flex items-center gap-1'>
80+
<Wallet className='w-4 h-4 text-lg' />
81+
{backer.walletId}
82+
</div>
8183
</div>
8284
</div>
85+
<div className=' font-medium ml-20 text-muted-foreground'>
86+
${backer.amount.toLocaleString()}
87+
</div>
88+
<div className='text-muted-foreground ml-20'>
89+
{formatDate(backer.date)}
90+
</div>
8391
</div>
84-
<div className=' font-medium ml-20 text-muted-foreground'>
85-
${backer.amount.toLocaleString()}
86-
</div>
87-
<div className='text-muted-foreground ml-20'>
88-
{formatDate(backer.date)}
89-
</div>
92+
))}
93+
</div>
94+
95+
{backers.length === 0 && (
96+
<div className='text-center py-8 text-muted-foreground'>
97+
No backers found matching your criteria
9098
</div>
91-
))}
99+
)}
92100
</div>
93-
94-
{backers.length === 0 && (
95-
<div className='text-center py-8 text-muted-foreground'>
96-
No backers found matching your criteria
97-
</div>
98-
)}
99-
</>
101+
</div>
100102
);
101103
};
102104

0 commit comments

Comments
 (0)