@@ -5,7 +5,7 @@ import { RepositoryCarousel } from "./repositoryCarousel";
55import { useDomain } from "@/hooks/useDomain" ;
66import { useQuery } from "@tanstack/react-query" ;
77import { unwrapServiceError } from "@/lib/utils" ;
8- import { getRepos } from "@/actions " ;
8+ import { getRepos } from "@/app/api/(client)/client " ;
99import { env } from "@/env.mjs" ;
1010import { Skeleton } from "@/components/ui/skeleton" ;
1111import {
@@ -22,14 +22,16 @@ interface RepositorySnapshotProps {
2222 repos : RepositoryQuery [ ] ;
2323}
2424
25+ const MAX_REPOS_TO_DISPLAY_IN_CAROUSEL = 100 ;
26+
2527export function RepositorySnapshot ( {
2628 repos : initialRepos ,
2729} : RepositorySnapshotProps ) {
2830 const domain = useDomain ( ) ;
2931
3032 const { data : repos , isPending, isError } = useQuery ( {
3133 queryKey : [ 'repos' , domain ] ,
32- queryFn : ( ) => unwrapServiceError ( getRepos ( domain ) ) ,
34+ queryFn : ( ) => unwrapServiceError ( getRepos ( ) ) ,
3335 refetchInterval : env . NEXT_PUBLIC_POLLING_INTERVAL_MS ,
3436 placeholderData : initialRepos ,
3537 } ) ;
@@ -78,7 +80,9 @@ export function RepositorySnapshot({
7880 </ Link >
7981 { ` indexed` }
8082 </ span >
81- < RepositoryCarousel repos = { indexedRepos } />
83+ < RepositoryCarousel
84+ repos = { indexedRepos . slice ( 0 , MAX_REPOS_TO_DISPLAY_IN_CAROUSEL ) }
85+ />
8286 { process . env . NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT === "demo" && (
8387 < p className = "text-sm text-muted-foreground text-center" >
8488 Interested in using Sourcebot on your code? Check out our{ ' ' }
0 commit comments