From d3cc4c077c6844cab2b5aacdd8c74588f34f073d Mon Sep 17 00:00:00 2001 From: 2nguyen Date: Wed, 19 Aug 2026 14:26:13 +0700 Subject: [PATCH] refactor: refactor structures --- src/App.jsx | 6 ++---- src/components/CourseCard.jsx | 4 ++-- src/config/navigation.js | 19 +++++++------------ .../CoursesPage.jsx} | 4 ++-- src/pages/CoursesPage.jsx | 18 ------------------ 5 files changed, 13 insertions(+), 38 deletions(-) rename src/pages/{Dashboard/DashboardPage.jsx => Course/CoursesPage.jsx} (98%) delete mode 100644 src/pages/CoursesPage.jsx diff --git a/src/App.jsx b/src/App.jsx index 90a9083..17037ac 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -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() { }> - } /> - } /> + } /> } /> } /> } /> diff --git a/src/components/CourseCard.jsx b/src/components/CourseCard.jsx index 3e02dcb..7a884df 100644 --- a/src/components/CourseCard.jsx +++ b/src/components/CourseCard.jsx @@ -33,11 +33,11 @@ function CourseCard({ course, image }) { {/* Content */} -

+

{title}

-

+

{description}

diff --git a/src/config/navigation.js b/src/config/navigation.js index 9f931d0..1b35f84 100644 --- a/src/config/navigation.js +++ b/src/config/navigation.js @@ -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' + } +]; diff --git a/src/pages/Dashboard/DashboardPage.jsx b/src/pages/Course/CoursesPage.jsx similarity index 98% rename from src/pages/Dashboard/DashboardPage.jsx rename to src/pages/Course/CoursesPage.jsx index 79b46d1..4d74516 100644 --- a/src/pages/Dashboard/DashboardPage.jsx +++ b/src/pages/Course/CoursesPage.jsx @@ -46,7 +46,7 @@ const stats = [ } ]; -function DashboardPage() { +function CoursePage() { return ( <>
@@ -150,4 +150,4 @@ function DashboardPage() { ); } -export default DashboardPage; +export default CoursePage; diff --git a/src/pages/CoursesPage.jsx b/src/pages/CoursesPage.jsx deleted file mode 100644 index 0219904..0000000 --- a/src/pages/CoursesPage.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import PageHeader from '../components/PageHeader.jsx' - -function CoursesPage() { - return ( - <> - -
-

Danh sach khoa hoc

-

Khoi tao noi dung quan ly khoa hoc tai day.

-
- - ) -} - -export default CoursesPage