profilecity/vidur
Add Admin Dashboard Button on Homepage for Admin Users
Open
#206 opened on Dec 22, 2024
enhancementgood first issueui
Repository metrics
- Stars
- (428 stars)
- PR merge metrics
- (PR metrics pending)
Description
Feature Request
Add a button linking to the Admin Dashboard on the homepage of job postings, visible only when an admin user is logged in.
Details
- Current Behavior: The homepage of job postings does not display a link or button to the Admin Dashboard.
- Expected Behavior: If an admin is logged in, a button labeled "Admin Dashboard" should be visible on the homepage. Clicking the button should redirect to the admin dashboard.
Acceptance Criteria
- Display the "Admin Dashboard" button on the homepage only when:
- The logged-in user is an admin.
- Proper authentication and role checks are performed.
- Ensure the button is styled consistently with the website's UI.
- Redirect the button to the correct admin dashboard route (e.g.,
/admin/dashboard).
Suggested Implementation
- Add a conditional check for the admin role in the homepage component.
- Use role-based authentication to display the button.
- Apply existing styles or create a new button style if necessary.