Enhance GoalCard component with conversion rate display

- Updated GoalCard to include a visual representation of the goal's conversion rate, improving user feedback on goal performance.
- Adjusted padding in the layout for better visual consistency.
This commit is contained in:
Bill Yang 2025-04-28 21:49:03 -07:00
parent 86966663c3
commit efcd13f7cc

View file

@ -43,7 +43,7 @@ export default function GoalCard({ goal, siteId }: GoalCardProps) {
return (
<>
<div className="rounded-lg bg-neutral-900 border border-neutral-800 overflow-hidden">
<div className="p-4 flex items-center">
<div className="px-4 py-3 flex items-center">
{/* Left section - Title and type */}
<div className="flex-1 pr-4">
<h3 className="font-medium text-base flex items-center gap-2">
@ -127,6 +127,12 @@ export default function GoalCard({ goal, siteId }: GoalCardProps) {
</Button>
</div>
</div>
<div
style={{
width: goal.conversion_rate * 100 + "%",
}}
className="bg-accent-400 h-2 rounded-md"
></div>
</div>
{/* Delete Confirmation Dialog */}