diff --git a/src/app/(marketing)/donation/success/page.tsx b/src/app/(marketing)/donation/success/page.tsx index c5953ef..ab4e9f7 100644 --- a/src/app/(marketing)/donation/success/page.tsx +++ b/src/app/(marketing)/donation/success/page.tsx @@ -10,6 +10,7 @@ import { Button } from "@/shared/ui/button" import { apiFetch } from "@/shared/lib/api-fetch" import { queryKeys } from "@/shared/lib/query-keys" import type { Donation } from "@/features/admin/donations/types" +import { computeDonationTotal } from "@/features/marketing/lib/donation-pricing" function DonationSuccessContent() { const searchParams = useSearchParams() @@ -58,7 +59,7 @@ function DonationSuccessContent() {

Your donation of{" "} - ${Number(donation?.amount ?? 0).toFixed(2)} USD + ${computeDonationTotal(Number(donation?.amount ?? 0)).toFixed(2)} USD {" "} has been received. Your support helps us make a real impact.

diff --git a/src/app/(user)/dashboard/page.tsx b/src/app/(user)/dashboard/page.tsx index 9d3ce84..0abb824 100644 --- a/src/app/(user)/dashboard/page.tsx +++ b/src/app/(user)/dashboard/page.tsx @@ -58,7 +58,7 @@ export default function UserDashboardPage() { }, [enrollments]) return ( -
+

@@ -73,11 +73,11 @@ export default function UserDashboardPage() {

{isLoading ? ( -
+
{Array.from({ length: 6 }).map((_, i) => (
@@ -116,7 +116,7 @@ export default function UserDashboardPage() { ) : ( -
+
{courses?.map((course) => { const enrolledProgress = enrollmentMap.get(course.id) const isEnrolled = enrolledProgress !== undefined @@ -124,7 +124,11 @@ export default function UserDashboardPage() { return ( {children} @@ -73,7 +73,9 @@ function Title({ function Tutor({ name }: { name: string | null }) { return ( -

{name}

+

+ {name} +

) } @@ -81,10 +83,7 @@ function Rating({ avg, count }: { avg: number; count: number }) { return (
- @@ -138,7 +137,9 @@ function DisplayPrice({ className?: string }) { return ( -

+

$ {displayPrice?.toFixed(2)} USD

) diff --git a/src/features/courses/components/enroll-now-button.tsx b/src/features/courses/components/enroll-now-button.tsx index 646863b..45b6d83 100644 --- a/src/features/courses/components/enroll-now-button.tsx +++ b/src/features/courses/components/enroll-now-button.tsx @@ -24,7 +24,9 @@ export function EnrollNowButton({ queryKey: queryKeys.enrollment.check(courseId), queryFn: async () => { try { - return await apiFetch<{ enrolled: boolean }>(`/api/enrollments/check/${courseId}`) + return await apiFetch<{ enrolled: boolean }>( + `/api/enrollments/check/${courseId}` + ) } catch { return { enrolled: false } } @@ -80,7 +82,7 @@ export function EnrollNowButton({
diff --git a/src/features/marketing/components/community-section.tsx b/src/features/marketing/components/community-section.tsx index 9ae7ea8..6a3db98 100644 --- a/src/features/marketing/components/community-section.tsx +++ b/src/features/marketing/components/community-section.tsx @@ -4,7 +4,7 @@ import React from "react" const CommunitySection = () => { return (
-
+
People putting hands together -
+
+

@@ -117,7 +120,10 @@ export function ContactHeroSection({ name="name" render={({ field, fieldState }) => ( - + Full Name - {fieldState.invalid && } + {fieldState.invalid && ( + + )} )} /> @@ -139,7 +147,10 @@ export function ContactHeroSection({ name="email" render={({ field, fieldState }) => ( - + Email - {fieldState.invalid && } + {fieldState.invalid && ( + + )} )} /> @@ -161,7 +174,10 @@ export function ContactHeroSection({ name="phone" render={({ field, fieldState }) => ( - + Phone number - {fieldState.invalid && } + {fieldState.invalid && ( + + )} )} /> @@ -184,7 +202,10 @@ export function ContactHeroSection({ name="message" render={({ field, fieldState }) => ( - + Message