Skip to content

Commit 6c0dded

Browse files
committed
Simplifies collection progress handling comments
Refactors the collection progress component to streamline data fetching and rendering logic. Removes an unnecessary condition that always rendered the container, simplifying the component's structure.
1 parent aa628a4 commit 6c0dded

File tree

1 file changed

+1
-2
lines changed
  • src/components/tutorials-sidebar/components/tutorial-view-sidebar-content

1 file changed

+1
-2
lines changed

src/components/tutorials-sidebar/components/tutorial-view-sidebar-content/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function CollectionProgress({ collection }: { collection: Collection }) {
6565
* CTA bar we display for the collection.
6666
*/
6767
const { data: progressData, isLoading } = useCollectionProgress({
68-
collectionId: id, // If id is undefined, the hook will handle it appropriately
68+
collectionId: id,
6969
})
7070

7171
/**
@@ -87,7 +87,6 @@ function CollectionProgress({ collection }: { collection: Collection }) {
8787
})
8888
}, [progressData, tutorials, id, slug, collection])
8989

90-
// Always render the container to maintain layout consistency
9190
return (
9291
<div className={s.collectionProgressContainer}>
9392
{!isLoading && collection && id && tutorials && (

0 commit comments

Comments
 (0)