Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove categoryObject
  • Loading branch information
mikachan committed Dec 18, 2024
commit 45ec9af47e86dd42a14fbe21d09093c5bb15f554
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,9 @@ export function PatternCategoryPreviews( {
]
);

const categoryObject = availableCategories.find(
( { name } ) => name === category.name
);

const pagingProps = usePatternsPaging(
currentCategoryPatterns,
categoryObject,
category,
scrollContainerRef
);
const { changePage } = pagingProps;
Expand Down Expand Up @@ -153,7 +149,7 @@ export function PatternCategoryPreviews( {
level={ 4 }
as="div"
>
{ categoryObject?.label }
{ category?.label }
</Heading>
</FlexBlock>
<PatternsFilter
Expand All @@ -162,7 +158,7 @@ export function PatternCategoryPreviews( {
setPatternSyncFilter={ onSetPatternSyncFilter }
setPatternSourceFilter={ onSetPatternSourceFilter }
scrollContainerRef={ scrollContainerRef }
category={ categoryObject }
category={ category }
/>
</HStack>
{ ! currentCategoryPatterns.length && (
Expand All @@ -188,9 +184,9 @@ export function PatternCategoryPreviews( {
blockPatterns={ pagingProps.categoryPatterns }
onClickPattern={ onClickPattern }
onHover={ onHover }
label={ categoryObject.label }
label={ category.label }
orientation="vertical"
category={ categoryObject.name }
category={ category.name }
isDraggable
showTitlesAsTooltip={ showTitlesAsTooltip }
patternFilter={ patternSourceFilter }
Expand Down
Loading