Skip to content

Commit 1b97c7c

Browse files
author
Boopathi
committed
Update education component
1 parent 6d72b5f commit 1b97c7c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/views/education.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { ScrollArea } from "@/components/ui/scroll-area";
77
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
88
import { Button } from "@/components/ui/button";
99
import * as LucideIcons from "lucide-react";
10+
import type { LucideProps } from "lucide-react";
1011
import { Badge } from "@/components/ui/badge";
1112
import EducationBookingModal from "./education-booking-modal";
1213
import type { View, EducationProgram, EducationSession } from "@/app/types";
@@ -63,7 +64,10 @@ const LoadingSkeleton = () => (
6364
);
6465

6566
const getIconForFeature = (iconName: string): React.ReactNode => {
66-
const Icon = LucideIcons[iconName as keyof typeof LucideIcons] || LucideIcons.Check;
67+
const Icon = (LucideIcons as any)[iconName] as React.ComponentType<LucideProps> | undefined;
68+
if (!Icon) {
69+
return <LucideIcons.Check className="h-5 w-5 text-primary" />;
70+
}
6771
return <Icon className="h-5 w-5 text-primary" />;
6872
};
6973

0 commit comments

Comments
 (0)