enhancementgood first issueui
仓库指标
- 星标
- (428 个星标)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
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.