@@ -2,7 +2,7 @@ import React, { useState, useMemo } from 'react';
22import { Button } from '@/components/ui/button' ;
33import { Input } from '@/components/ui/input' ;
44import { Card , CardContent } from '@/components/ui/card' ;
5- import { Badge } from '@/components/ui/badge' ;
5+
66import { Search , Loader2 , ExternalLink , Zap , User , CheckCircle2 , Plus } from 'lucide-react' ;
77import { Dialog , DialogContent , DialogHeader , DialogTitle , DialogDescription } from '@/components/ui/dialog' ;
88import { usePipedreamApps } from '@/hooks/react-query/pipedream/use-pipedream' ;
@@ -28,15 +28,15 @@ export const PipedreamRegistry: React.FC<PipedreamRegistryProps> = ({
2828} ) => {
2929 const [ search , setSearch ] = useState ( '' ) ;
3030 const [ selectedCategory ] = useState < string > ( '' ) ; // Category filtering removed - always show all apps
31- const [ page , setPage ] = useState ( 1 ) ;
31+
3232 // Removed viewMode - using consistent grid layout
3333 const [ showToolSelector , setShowToolSelector ] = useState ( false ) ;
3434 const [ selectedProfile , setSelectedProfile ] = useState < PipedreamProfile | null > ( null ) ;
3535 const [ showProfileManager , setShowProfileManager ] = useState ( false ) ;
3636 const [ selectedAppForProfile , setSelectedAppForProfile ] = useState < { app_slug : string ; app_name : string } | null > ( null ) ;
3737
3838 const queryClient = useQueryClient ( ) ;
39- const { data : appsData , isLoading, error, refetch } = usePipedreamApps ( page , search , selectedCategory ) ;
39+ const { data : appsData , isLoading, error, refetch } = usePipedreamApps ( search , selectedCategory ) ;
4040 const { data : profiles } = usePipedreamProfiles ( ) ;
4141
4242 // Removed allAppsData query - no longer needed without category filtering
@@ -45,7 +45,6 @@ export const PipedreamRegistry: React.FC<PipedreamRegistryProps> = ({
4545
4646 const handleSearch = ( value : string ) => {
4747 setSearch ( value ) ;
48- setPage ( 1 ) ;
4948 } ;
5049
5150 const handleSearchSubmit = ( e : React . FormEvent ) => {
@@ -189,14 +188,7 @@ export const PipedreamRegistry: React.FC<PipedreamRegistryProps> = ({
189188 { app . description }
190189 </ p >
191190
192- { /* Featured Badge */ }
193- { app . featured_weight > 100000 && (
194- < div className = "mb-4" >
195- < Badge variant = "default" className = "text-xs bg-primary/10 text-primary border-primary/20" >
196- Featured
197- </ Badge >
198- </ div >
199- ) }
191+
200192
201193 { /* Connection Status */ }
202194 < div className = "mt-auto" >
@@ -287,62 +279,13 @@ export const PipedreamRegistry: React.FC<PipedreamRegistryProps> = ({
287279
288280 { ! isLoading && appsData ?. apps && appsData . apps . length > 0 && (
289281 < >
290- { /* Featured Apps Section - only show on first page with no search */ }
291- { page === 1 && ! search && (
292- < >
293- < div className = "mb-8" >
294- < div className = "flex items-center gap-2 mb-4" >
295- < h3 className = "text-lg font-semibold text-foreground" > Featured Apps</ h3 >
296- < Badge variant = "outline" className = "text-xs" > Popular</ Badge >
297- </ div >
298- < div className = "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-4 max-w-full" >
299- { appsData . apps . filter ( app => app . featured_weight > 100000 ) . slice ( 0 , 8 ) . map ( ( app : PipedreamApp ) => (
300- < AppCard key = { `featured-${ app . id } ` } app = { app } />
301- ) ) }
302- </ div >
303- </ div >
304-
305- { /* All Apps Section */ }
306- < div className = "mb-6" >
307- < h3 className = "text-lg font-semibold text-foreground mb-4" > All Apps</ h3 >
308- < div className = "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-4 max-w-full" >
309- { appsData . apps . map ( ( app : PipedreamApp ) => (
310- < AppCard key = { app . id } app = { app } />
311- ) ) }
312- </ div >
313- </ div >
314- </ >
315- ) }
316-
317- { /* Regular view for search results or subsequent pages */ }
318- { ( page > 1 || search ) && (
319- < div className = "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-4 max-w-full" >
320- { appsData . apps . map ( ( app : PipedreamApp ) => (
321- < AppCard key = { app . id } app = { app } />
322- ) ) }
323- </ div >
324- ) }
282+ < div className = "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-4 max-w-full" >
283+ { appsData . apps . map ( ( app : PipedreamApp ) => (
284+ < AppCard key = { app . id } app = { app } />
285+ ) ) }
286+ </ div >
287+
325288
326- { appsData . page_info && appsData . page_info . end_cursor && (
327- < div className = "flex justify-center pt-8" >
328- < Button
329- onClick = { ( ) => setPage ( page + 1 ) }
330- disabled = { isLoading }
331- variant = "default"
332- size = "lg"
333- className = "px-8 py-2 bg-primary hover:bg-primary/90 text-primary-foreground"
334- >
335- { isLoading ? (
336- < >
337- < Loader2 className = "h-4 w-4 animate-spin mr-2" />
338- Loading more apps...
339- </ >
340- ) : (
341- 'Load More Apps'
342- ) }
343- </ Button >
344- </ div >
345- ) }
346289 </ >
347290 ) }
348291
@@ -357,7 +300,6 @@ export const PipedreamRegistry: React.FC<PipedreamRegistryProps> = ({
357300 < Button
358301 onClick = { ( ) => {
359302 setSearch ( '' ) ;
360- setPage ( 1 ) ;
361303 } }
362304 variant = "default"
363305 className = "px-6"
0 commit comments