import React, { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; import { Button, Typography, Spin, Row, Col, Empty, Tag } from 'antd'; import { ReadOutlined, ClockCircleOutlined, UserOutlined, BookOutlined } from '@ant-design/icons'; import { getVBCourses } from '../api'; const { Title, Paragraph } = Typography; const VBCourses = () => { const [courses, setCourses] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { const fetchCourses = async () => { try { const res = await getVBCourses(); setCourses(res.data); } catch (error) { console.error("Failed to fetch VB Courses:", error); } finally { setLoading(false); } } fetchCourses(); }, []); if (loading) return
{item.description}