refactor: refactor structures

This commit is contained in:
2nguyen
2026-08-19 14:26:13 +07:00
parent fd11fa59b1
commit d3cc4c077c
5 changed files with 13 additions and 38 deletions
+2 -4
View File
@@ -1,7 +1,6 @@
import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom';
import MainLayout from './layouts/MainLayout.jsx';
import DashboardPage from './pages/Dashboard/DashboardPage.jsx';
import CoursesPage from './pages/CoursesPage.jsx';
import CoursesPage from './pages/Course/CoursesPage.jsx';
import StudentsPage from './pages/StudentsPage.jsx';
import ClassesPage from './pages/ClassesPage.jsx';
import ReportsPage from './pages/ReportsPage.jsx';
@@ -12,8 +11,7 @@ function App() {
<BrowserRouter>
<Routes>
<Route element={<MainLayout />}>
<Route index element={<Navigate to="/dashboard" replace />} />
<Route path="/dashboard" element={<DashboardPage />} />
<Route index element={<Navigate to="/courses" replace />} />
<Route path="/courses" element={<CoursesPage />} />
<Route path="/students" element={<StudentsPage />} />
<Route path="/classes" element={<ClassesPage />} />
+2 -2
View File
@@ -33,11 +33,11 @@ function CourseCard({ course, image }) {
{/* Content */}
<Card.Content className="px-5 py-5">
<h3 className="mb-3 text-xl font-medium leading-tight text-gray-900">
<h3 className="mb-3 text-xl font-bold leading-tight text-gray-900">
{title}
</h3>
<p className="line-clamp-2 text-lg leading-8 text-gray-700">
<p className="line-clamp-2 text-md leading-8 text-gray-700">
{description}
</p>
</Card.Content>
+7 -12
View File
@@ -1,27 +1,22 @@
export const navigationItems = [
{
label: 'Tong quan',
shortLabel: 'TQ',
path: '/dashboard',
},
{
label: 'Khoa hoc',
label: 'Courses',
shortLabel: 'KH',
path: '/courses',
path: '/courses'
},
{
label: 'Hoc vien',
shortLabel: 'HV',
path: '/students',
path: '/students'
},
{
label: 'Lop hoc',
shortLabel: 'LH',
path: '/classes',
path: '/classes'
},
{
label: 'Bao cao',
shortLabel: 'BC',
path: '/reports',
},
]
path: '/reports'
}
];
@@ -46,7 +46,7 @@ const stats = [
}
];
function DashboardPage() {
function CoursePage() {
return (
<>
<div className="mb-3 flex flex-row items-center justify-between">
@@ -150,4 +150,4 @@ function DashboardPage() {
);
}
export default DashboardPage;
export default CoursePage;
-18
View File
@@ -1,18 +0,0 @@
import PageHeader from '../components/PageHeader.jsx'
function CoursesPage() {
return (
<>
<PageHeader
title="Khoa hoc"
description="Quan ly danh sach khoa hoc, noi dung bai hoc va trang thai xuat ban."
/>
<section className="content-panel">
<h2>Danh sach khoa hoc</h2>
<p>Khoi tao noi dung quan ly khoa hoc tai day.</p>
</section>
</>
)
}
export default CoursesPage