Skip to content

Commit 4f1c033

Browse files
committed
fix: pass activeCategory parameter to resolve ReferenceError
1 parent b69c082 commit 4f1c033

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • multimodal/websites/docs/src/components/Showcase

multimodal/websites/docs/src/components/Showcase/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const Showcase: React.FC = () => {
9595
isLoading={isLoading}
9696
error={error}
9797
onRetry={refetch}
98-
onNavigateToDetail={(item) => {
98+
onNavigateToDetail={(item, activeCategory) => {
9999
// Pass current category as state to preserve filter when navigating back
100100
navigate(`/showcase/${encodeURIComponent(item.id)}`, {
101101
state: { previousCategory: activeCategory !== 'all' ? activeCategory : null }
@@ -111,7 +111,7 @@ interface ShowcaseListPageProps {
111111
isLoading: boolean;
112112
error: string | null;
113113
onRetry: () => void;
114-
onNavigateToDetail: (item: ShowcaseItem) => void;
114+
onNavigateToDetail: (item: ShowcaseItem, activeCategory: string) => void;
115115
}
116116

117117
const ShowcaseListPage: React.FC<ShowcaseListPageProps> = ({
@@ -238,7 +238,7 @@ const ShowcaseListPage: React.FC<ShowcaseListPageProps> = ({
238238
key={item.id}
239239
item={item}
240240
index={index}
241-
onOpenPreview={onNavigateToDetail}
241+
onOpenPreview={(item) => onNavigateToDetail(item, activeCategory)}
242242
/>
243243
))}
244244
</div>

0 commit comments

Comments
 (0)