Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a sidebar navigation and category tabs to enhance page organization for Hadith collections, books, and individual hadith pages. The key changes include:
- Adding a new HadithSidebar component that wraps page content with a sidebar navigation.
- Introducing a CategoryTabs component to provide tabbed navigation across different content types.
- Updating various pages and layouts to integrate the sidebar and tab navigation.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| fe/src/components/hadith-sidebar.tsx | Introduces the sidebar navigation with collections, books, and hadith links. |
| fe/src/components/category-tabs.tsx | Adds tabbed navigation for switching between collections, books, and hadiths. |
| fe/src/app/collections/page.tsx | Integrates CategoryTabs into the collections overview page. |
| fe/src/app/collections/layout.tsx | Updates the layout to wrap pages in the new sidebar navigation. |
| fe/src/app/collections/[collectionId]/page.tsx | Updates the collection page to include CategoryTabs with "books" active. |
| fe/src/app/collections/[collectionId]/[bookId]/page.tsx | Updates the book page to include CategoryTabs with "hadiths" active. |
| fe/src/app/collections/[collectionId]/[bookId]/[hadithId]/page.tsx | Updates the hadith page to include CategoryTabs with "hadiths" active. |
Comments suppressed due to low confidence (1)
fe/src/app/collections/layout.tsx:26
- New logic in CollectionsLayout introduces a branch based on the presence of a collectionId. Please ensure there is adequate test coverage for both cases.
if (params.collectionId) {
|
|
||
| export function CategoryTabs({ active, collectionId, bookId }: CategoryTabsProps) { | ||
| return ( | ||
| <Tabs defaultValue={active} className="mb-4"> |
There was a problem hiding this comment.
[nitpick] Consider using a controlled Tabs component (using the 'value' prop with an onChange handler) if the active tab might change after the initial render, ensuring the UI reflects prop updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CategoryTabscomponentHadithSidebarcomponent for nested navigationTesting
npm run lint(fails:next: not found)