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 { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom';
import MainLayout from './layouts/MainLayout.jsx'; import MainLayout from './layouts/MainLayout.jsx';
import DashboardPage from './pages/Dashboard/DashboardPage.jsx'; import CoursesPage from './pages/Course/CoursesPage.jsx';
import CoursesPage from './pages/CoursesPage.jsx';
import StudentsPage from './pages/StudentsPage.jsx'; import StudentsPage from './pages/StudentsPage.jsx';
import ClassesPage from './pages/ClassesPage.jsx'; import ClassesPage from './pages/ClassesPage.jsx';
import ReportsPage from './pages/ReportsPage.jsx'; import ReportsPage from './pages/ReportsPage.jsx';
@@ -12,8 +11,7 @@ function App() {
<BrowserRouter> <BrowserRouter>
<Routes> <Routes>
<Route element={<MainLayout />}> <Route element={<MainLayout />}>
<Route index element={<Navigate to="/dashboard" replace />} /> <Route index element={<Navigate to="/courses" replace />} />
<Route path="/dashboard" element={<DashboardPage />} />
<Route path="/courses" element={<CoursesPage />} /> <Route path="/courses" element={<CoursesPage />} />
<Route path="/students" element={<StudentsPage />} /> <Route path="/students" element={<StudentsPage />} />
<Route path="/classes" element={<ClassesPage />} /> <Route path="/classes" element={<ClassesPage />} />
+2 -2
View File
@@ -33,11 +33,11 @@ function CourseCard({ course, image }) {
{/* Content */} {/* Content */}
<Card.Content className="px-5 py-5"> <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} {title}
</h3> </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} {description}
</p> </p>
</Card.Content> </Card.Content>
+7 -12
View File
@@ -1,27 +1,22 @@
export const navigationItems = [ export const navigationItems = [
{ {
label: 'Tong quan', label: 'Courses',
shortLabel: 'TQ',
path: '/dashboard',
},
{
label: 'Khoa hoc',
shortLabel: 'KH', shortLabel: 'KH',
path: '/courses', path: '/courses'
}, },
{ {
label: 'Hoc vien', label: 'Hoc vien',
shortLabel: 'HV', shortLabel: 'HV',
path: '/students', path: '/students'
}, },
{ {
label: 'Lop hoc', label: 'Lop hoc',
shortLabel: 'LH', shortLabel: 'LH',
path: '/classes', path: '/classes'
}, },
{ {
label: 'Bao cao', label: 'Bao cao',
shortLabel: 'BC', shortLabel: 'BC',
path: '/reports', path: '/reports'
}, }
] ];
@@ -46,7 +46,7 @@ const stats = [
} }
]; ];
function DashboardPage() { function CoursePage() {
return ( return (
<> <>
<div className="mb-3 flex flex-row items-center justify-between"> <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