@@ -125,35 +125,37 @@ export const SearchMode = () => {
125125 </ div >
126126 ) }
127127 < SearchInput />
128- < SearchPage />
129- < ul
130- className = { cn (
131- `trieve-elements-${ props . type } tv-grow` ,
132- props . type === "ecommerce" && ! props . inline &&
133- "tv-grid tv-grid-cols-2 sm:tv-grid-cols-3 md:tv-grid-cols-4 lg:tv-grid-cols-5 tv-gap-2 tv-mt-0.5 tv-py-2 tv-pr-0.5" ,
134- props . type === "ecommerce" && props . inline && props . defaultSearchMode === "search" &&
135- "tv-grid tv-grid-cols-2 sm:tv-grid-cols-3 md:tv-grid-cols-4 tv-gap-4 tv-mt-0.5 tv-py-2 tv-pr-0.5 tv-max-w-[70vw]" ,
136- props . type === "ecommerce" && props . inline && props . defaultSearchMode !== "search" && "tv-grid tv-grid-cols-1" ,
137- "tv-overflow-y-auto" ,
138- ) }
139- >
140- { resultsLength && props . chat && imageUrl . length == 0 && props . defaultSearchMode !== "search" ? (
141- < GoToChatPrompt />
142- ) : null }
143- { props . type === "pdf" ? (
144- < div className = "tv-grid md:tv-grid-cols-3" > { resultsDisplay } </ div >
145- ) : (
146- resultsDisplay
147- ) }
148- </ ul >
149- { hasQuery && ! resultsLength && ! loadingResults && (
150- < NoResults props = { props } query = { query } />
151- ) }
152- { hasQuery && ! resultsLength && loadingResults && (
153- < div className = "tv-text-sm tv-animate-pulse tv-text-center tv-my-8 tv-flex tv-flex-col tv-gap-2 tv-col-span-full" >
154- < p className = "" > Searching...</ p >
128+ < div className = "tv-flex tv-flex-grow tv-overflow-y-auto" >
129+ < SearchPage />
130+ < ul
131+ className = { cn (
132+ `trieve-elements-${ props . type } tv-grow` ,
133+ props . type === "ecommerce" && ! props . inline &&
134+ "tv-grid tv-grid-cols-2 sm:tv-grid-cols-3 md:tv-grid-cols-4 lg:tv-grid-cols-5 tv-gap-2 tv-mt-0.5 tv-py-2 tv-pr-0.5" ,
135+ props . type === "ecommerce" && props . inline && props . defaultSearchMode === "search" &&
136+ "tv-grid tv-grid-cols-2 sm:tv-grid-cols-3 md:tv-grid-cols-4 tv-gap-4 tv-mt-0.5 tv-py-2 tv-pr-0.5 tv-max-w-[70vw]" ,
137+ props . type === "ecommerce" && props . inline && props . defaultSearchMode !== "search" && "tv-grid tv-grid-cols-1" ,
138+ "tv-overflow-y-auto" ,
139+ ) }
140+ >
141+ { resultsLength && props . chat && imageUrl . length == 0 && props . defaultSearchMode !== "search" ? (
142+ < GoToChatPrompt />
143+ ) : null }
144+ { props . type === "pdf" ? (
145+ < div className = "tv-grid md:tv-grid-cols-3" > { resultsDisplay } </ div >
146+ ) : (
147+ resultsDisplay
148+ ) }
149+ </ ul >
155150 </ div >
156- ) }
151+ { hasQuery && ! resultsLength && ! loadingResults && (
152+ < NoResults props = { props } query = { query } />
153+ ) }
154+ { hasQuery && ! resultsLength && loadingResults && (
155+ < div className = "tv-text-sm tv-animate-pulse tv-text-center tv-my-8 tv-flex tv-flex-col tv-gap-2 tv-col-span-full" >
156+ < p className = "" > Searching...</ p >
157+ </ div >
158+ ) }
157159 </ >
158160 ) ;
159161} ;
0 commit comments