-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SELS-TASK-32] [FE] - Admin Dashboard Page #35
base: main
Are you sure you want to change the base?
Conversation
a321926
to
c8f2ac0
Compare
const AdminDashboard = () => { | ||
return ( | ||
<> | ||
<title>Dashboard</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it Admin | Dashboard
@@ -27,7 +28,7 @@ const CategoryListPage = () => { | |||
return ( | |||
<> | |||
<title>Categories</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it Admin | Categories
<span className="text-blue-500 cursor-pointer"> | ||
{' '} | ||
{user.first_name}{' '} | ||
</span>{' '} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove all {' '}
that are unnecessary.
ForbiddenException, | ||
|
||
} from '@nestjs/common'; | ||
import { CategoriesService } from './categories.service'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you revert this change. it's not necessary.
<Link to={{pathname: `/admin/category/${category.id}/addword`}}> | ||
<button | ||
type="button" | ||
className="px-[5px] underline decoration-sky-500 hover:bg-sky-500" | ||
> | ||
Add Words | ||
</button> | ||
</button> </Link> | ||
<Link to={{pathname: `/admin/category/${category.id}/edit`}}> | ||
<button | ||
type="button" | ||
className="px-[5px] underline decoration-yellow-500 hover:bg-yellow-700" | ||
> | ||
Edit | ||
</button> | ||
</button> </Link> | ||
<Link to={{pathname: `/admin/category/${category.id}/delete`}}> | ||
<button | ||
type="button" | ||
className="px-[5px] underline decoration-red-500 hover:bg-red-500" | ||
> | ||
Delete | ||
</button> | ||
</button> </Link> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frontend/src/Routes/routes.tsx
Outdated
@@ -22,6 +25,9 @@ const Main: React.FC = () => { | |||
<Route path="/dashboard" element={<Dashboard />} /> | |||
<Route path="/admin/users-list" element={<AdminUserPage />} /> | |||
<Route path="/student/category/:id/" element={<LessonAnswerPage />} /> | |||
<Route path="/admin/dashboard" element={<AdminDashboard/>} /> | |||
<Route path="/admin/categories" element={<CategoryListPage/>} /> | |||
<Route path="/admin/category/:id/addword" element={<AddWordPage/>} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use kebab case for routes
<Route path="/admin/category/:id/addword" element={<AddWordPage/>} /> | |
<Route path="/admin/category/:id/add-word" element={<AddWordPage/>} /> |
interface NavbarProps { | ||
title: string; | ||
} | ||
const AdminNavbar: React.FC<NavbarProps> = ({ title }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const AdminNavbar: React.FC<NavbarProps> = ({ title }) => { | |
const AdminNavbar = ({ title } : NavbarProps) => { |
import UserProfile from '../user.png'; | ||
import users from '../../dummydata'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use path alias
4607b1d
to
e98e0e6
Compare
Asana
[Commands]
npm start
[Pre-conditions]
[Expected Output]
[Screenshots]