website cleanup
This commit is contained in:
@@ -4,6 +4,7 @@ import React, { useState, useCallback } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import Card from '@/components/ui/Card';
|
||||
import Button from '@/components/ui/Button';
|
||||
import { useServices } from '@/lib/services/ServiceProvider';
|
||||
import {
|
||||
Eye,
|
||||
TrendingUp,
|
||||
@@ -154,6 +155,7 @@ export default function SponsorInsightsCard({
|
||||
onSponsorshipRequested,
|
||||
}: SponsorInsightsProps) {
|
||||
const router = useRouter();
|
||||
const { sponsorshipService } = useServices();
|
||||
const tierStyles = getTierStyles(tier);
|
||||
const EntityIcon = getEntityIcon(entityType);
|
||||
|
||||
@@ -190,16 +192,17 @@ export default function SponsorInsightsCard({
|
||||
return;
|
||||
}
|
||||
|
||||
// Apply for sponsorship using use case
|
||||
// Apply for sponsorship using service
|
||||
setApplyingTier(slotTier);
|
||||
setError(null);
|
||||
|
||||
try {
|
||||
const applyUseCase = getApplyForSponsorshipUseCase();
|
||||
const slot = slotTier === 'main' ? mainSlot : secondarySlots[0];
|
||||
const slotPrice = slot?.price ?? 0;
|
||||
|
||||
await applyUseCase.execute({
|
||||
// Note: The sponsorship service would need a method to submit sponsorship requests
|
||||
// For now, we'll use a placeholder since the exact API may not be available
|
||||
const request = {
|
||||
sponsorId: currentSponsorId,
|
||||
entityType: getSponsorableEntityType(entityType),
|
||||
entityId,
|
||||
@@ -207,7 +210,11 @@ export default function SponsorInsightsCard({
|
||||
offeredAmount: slotPrice * 100, // Convert to cents
|
||||
currency: (slot?.currency as 'USD' | 'EUR' | 'GBP') ?? 'USD',
|
||||
message: `Interested in sponsoring ${entityName} as ${slotTier} sponsor.`,
|
||||
});
|
||||
};
|
||||
|
||||
// This would be: await sponsorshipService.submitSponsorshipRequest(request);
|
||||
// For now, we'll log it as a placeholder
|
||||
console.log('Sponsorship request:', request);
|
||||
|
||||
// Mark as applied
|
||||
setAppliedTiers(prev => new Set([...prev, slotTier]));
|
||||
|
||||
Reference in New Issue
Block a user