import React, {useState} from 'react';
import { SettingOutlined, QuestionCircleOutlined, LogoutOutlined, DownOutlined} from '@ant-design/icons';
import Icon from '@ant-design/icons';
import AdministrationIcon from '~/components/customIcon/AdministrationIcon';
import MyCoursesIcon from '~/components/customIcon/MyCoursesIcon';
import ExaminationIcon from '~/components/customIcon/ExaminationIcon';
import CommunityIcon from '~/components/customIcon/CommunityIcon';
import NotificationIcon from '~/components/customIcon/NotificationIcon';
import {Layout, Menu, theme, Button, Modal, MenuProps} from 'antd';
import { Dropdown, Space } from 'antd';
import '../../public/assets/student-dashboard.css';
let courseData = [
{
id : "1",
title : "Life History of Dr. Maria Montessori",
chapter : "1",
Program : "Graduate Program",
img : "../../assets/course1.jpg"
},
{
id : "2",
title : "Introduction to Montessori Methods",
chapter : "2",
Program : "Graduate Program",
img : "../../assets/course2.jpg"
},
{
id : "3",
title : "Exercises on Practical Life",
chapter : "3",
Program : "Graduate Program",
img : "../../assets/course3.jpg"
}
];
let knowledgeData = [
{
id: "1",
status: "1",
title: "Assessment on Special Education",
challenge: "Challenge yourself & climb the leaderboard.",
question: "Subjective Question",
img: "../../assets/knowledge1.jpg"
},
{
id: "2",
status: "1",
title: "Quiz on Children Psychology",
challenge: "Challenge yourself & climb the leaderboard.",
question: "MCQ",
img: "../../assets/knowledge2.jpg"
},
{
id: "3",
status: "1",
title: "Quiz on Montessori Methods",
challenge: "Challenge yourself & climb the leaderboard.",
question: "MCQ",
img: "../../assets/knowledge3.jpg"
}
];
let performersData = [
{
id: "1",
name: "Eiden",
score: "48/50",
points: "999",
rank: "1",
program: "Graduate Program",
avatar: "../../assets/avatar1.png"
},
{
id: "2",
name: "Jackson",
score: "45/50",
points: "997",
rank: "2",
program: "Graduate Program",
avatar: "../../assets/avatar2.png"
},
{
id: "3",
name: "Emma Aria",
score: "43/50",
points: "994",
rank: "3",
program: "Graduate Program",
avatar: "../../assets/avatar3.png"
},
{
id: "4",
name: "John Doe",
score: "40/50",
points: "990",
rank: "4",
program: "Graduate Program",
avatar: "../../assets/avatar4.png"
},
{
id: "5",
name: "Jane Cooper",
score: "37/50",
points: "987",
rank: "5",
program: "Graduate Program",
avatar: "../../assets/avatar5.png"
},
{
id: "6",
name: "John Doe",
score: "35/50",
points: "982",
rank: "6",
program: "Graduate Program",
avatar: "../../assets/avatar6.png"
}
];
const sortedData = performersData.sort((a, b) => parseInt(a.rank) - parseInt(b.rank));
const highestRank = sortedData[0];
const secondHighestRank = sortedData[1];
const thirdHighestRank = sortedData[2];
console.log('The highest rank is:', highestRank);
console.log('The second highest rank is:', secondHighestRank);
console.log('The Third highest rank is:', thirdHighestRank);
// const highestRank = performersData.reduce((prev, current) => (prev.rank < current.rank) ? prev : current);
// console.log('The highest rank is:', highestRank);
const { Header, Content, Sider } = Layout;
const items1: MenuProps['items'] = ['1', '2', '3'].map((key) => ({
key,
label: `navsd ${key}`,
}));
type MenuItem = RequiredSettings
)
},
{
key: '16sd', style: {paddingTop: '10px', paddingBottom: '10px', border: 'none'},
icon: React.createElement(QuestionCircleOutlined, { style: { color: '#000' } }),
label: (Help & Support
)
},
{
key: '17sd', style: {paddingTop: '10px', paddingBottom: '10px', border: 'none'},
icon: React.createElement(LogoutOutlined, { style: { color: '#000' } }),
label: (Logout
)
},
],
},
];
const items: MenuProps['items'] = [
{
label: 1st menu item,
key: '01sd',
},
{
type: 'divider',
},
{
label: 2nd menu item,
key: '02sd',
},
{
type: 'divider',
},
{
label: '3rd menu item',
key: '03sd',
},
];
const App: React.FC = () => {
const [collapsed, setCollapsed] = useState(false);
const [open, setOpen] = React.useState
Some contents...
Some contents...
Some contents...
> {/*My Profile
Rayan Holiday
Student Dashboard
Chapter {data.chapter} • {data.Program}
{data.challenge}
{data.question}
Knowledge Quest
{secondHighestRank.name}
{secondHighestRank.score}
{highestRank.name}
{highestRank.score}
{thirdHighestRank.name}
{thirdHighestRank.score}
# {data.rank}
{data.name}
{data.program}
{data.points} Points