Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
424 changes: 220 additions & 204 deletions components/campaigns/CampaignSummary.tsx

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions components/campaigns/CampaignTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ const CampaignRow = ({
>
{campaign.status === 'live' && (
<>
<DropdownMenuItem
onClick={() => handleAction('back-project')}
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'
>
Back Project
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => handleAction('share')}
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'
Expand Down
2 changes: 1 addition & 1 deletion components/campaigns/back-project/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useState } from 'react';
import { BoundlessButton } from '@/components/buttons';
import { ProjectSubmissionSuccess } from '@/components/project';
import BoundlessSheet from '@/components/sheet/boundless-sheet';
import { ProjectSubmissionLoading } from '@/components/flows/back-project/project-submission-loading';
import { ProjectSubmissionLoading } from './project-submission-loading';
import { BackProjectForm } from './back-project-form';

type BackProjectState = 'form' | 'loading' | 'success';
Expand Down
110 changes: 56 additions & 54 deletions components/campaigns/backing-history/backing-history-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,67 +36,69 @@ const BackingHistoryTable: React.FC<BackingHistoryTableProps> = ({
};

return (
<>
{/* Results Header */}
<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'>
<div>Backer</div>
<div className='pl-20'>Amount</div>
<div className='pl-20'>Date</div>
</div>
<div className='overflow-x-auto'>
<div className='min-w-[600px]'>
{/* Results Header */}
<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'>
<div>Backer</div>
<div className='pl-20'>Amount</div>
<div className='pl-20'>Date</div>
</div>

{/* Backing List */}
<div className=''>
{backers.map(backer => (
<div
key={backer.id}
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'
>
<div className='flex items-center gap-3'>
<div className='relative w-10 h-10'>
<Avatar className='w-10 h-10'>
<AvatarImage src={backer.avatar || '/placeholder.svg'} />
<AvatarFallback
className={
backer.isAnonymous ? 'bg-green-600' : 'bg-blue-600'
}
>
{backer.isAnonymous ? (
<User className='w-4 h-4' />
) : (
backer.name.charAt(0)
)}
</AvatarFallback>
</Avatar>
<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'>
<CheckIcon className='w-2.5 h-2.5 text-[#787878]' />
</div>
</div>
<div>
<div className='text-white font-medium whitespace-nowrap'>
{backer.name}
{/* Backing List */}
<div className=''>
{backers.map(backer => (
<div
key={backer.id}
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'
>
<div className='flex items-center gap-3'>
<div className='relative w-10 h-10'>
<Avatar className='w-10 h-10'>
<AvatarImage src={backer.avatar || '/placeholder.svg'} />
<AvatarFallback
className={
backer.isAnonymous ? 'bg-green-600' : 'bg-blue-600'
}
>
{backer.isAnonymous ? (
<User className='w-4 h-4' />
) : (
backer.name.charAt(0)
)}
</AvatarFallback>
</Avatar>
<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'>
<CheckIcon className='w-2.5 h-2.5 text-[#787878]' />
</div>
</div>
<div className='text-xs text-muted-foreground flex items-center gap-1'>
<Wallet className='w-4 h-4 text-lg' />
{backer.walletId}
<div>
<div className='text-white font-medium whitespace-nowrap'>
{backer.name}
</div>
<div className='text-xs text-muted-foreground flex items-center gap-1'>
<Wallet className='w-4 h-4 text-lg' />
{backer.walletId}
</div>
</div>
</div>
<div className=' font-medium ml-20 text-muted-foreground'>
${backer.amount.toLocaleString()}
</div>
<div className='text-muted-foreground ml-20'>
{formatDate(backer.date)}
</div>
</div>
<div className=' font-medium ml-20 text-muted-foreground'>
${backer.amount.toLocaleString()}
</div>
<div className='text-muted-foreground ml-20'>
{formatDate(backer.date)}
</div>
))}
</div>

{backers.length === 0 && (
<div className='text-center py-8 text-muted-foreground'>
No backers found matching your criteria
</div>
))}
)}
</div>

{backers.length === 0 && (
<div className='text-center py-8 text-muted-foreground'>
No backers found matching your criteria
</div>
)}
</>
</div>
);
};

Expand Down
Loading
Loading