fix: expand button fix
This commit is contained in:
@@ -182,6 +182,7 @@ interface ChannelGroupProps {
|
||||
handleDraftChange: (placementId: string, patch: PlacementInlineDraft) => void;
|
||||
editingCell: EditingCell | null;
|
||||
setEditingCell: (cell: EditingCell | null) => void;
|
||||
expanded: boolean;
|
||||
}
|
||||
|
||||
function ChannelGroup({
|
||||
@@ -193,9 +194,14 @@ function ChannelGroup({
|
||||
handleDraftChange,
|
||||
editingCell,
|
||||
setEditingCell,
|
||||
expanded,
|
||||
}: ChannelGroupProps) {
|
||||
const [isOpen, setIsOpen] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
setIsOpen(expanded);
|
||||
}, [expanded]);
|
||||
|
||||
const totalCost = placements.reduce((sum, p) => sum + (p.details?.cost?.value || 0), 0);
|
||||
const totalSubscriptions = placements.reduce((sum, p) => sum + (p.placement_post?.subscriptions_count || 0), 0);
|
||||
const totalViews = placements.reduce((sum, p) => sum + (p.placement_post?.views_count || 0), 0);
|
||||
@@ -997,6 +1003,7 @@ export default function PurchasePlanDetailPage() {
|
||||
handleDraftChange={handleDraftChange}
|
||||
editingCell={editingCell}
|
||||
setEditingCell={setEditingCell}
|
||||
expanded={expandedAll}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user