File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const Pinned = () => {
1515 </ h1 >
1616 < div className = "mb-3 flex w-full flex-col items-center gap-2 px-6" >
1717 < div className = "w-full" >
18- < SearchBar type = "pinned" displayPapers = { displayPapers } />
18+ < SearchBar type = "pinned" displayPapers = { displayPapers . length > 0 } />
1919 </ div >
2020 </ div >
2121 < div className = "min-h-[40vh]" >
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ function PinnedSearchBar({
1717 filtersNotPulled,
1818} : {
1919 initialSubjects : string [ ] ;
20- displayPapers : IUpcomingPaper [ ] ,
20+ displayPapers : boolean ;
2121 filtersNotPulled ?: ( ) => void ;
2222} ) {
2323 const router = useRouter ( ) ;
@@ -237,7 +237,7 @@ function PinnedSearchBar({
237237 } }
238238 disabled = { ! showControls || searchText . trim ( ) === "" }
239239 />
240- { displayPapers . length > 0 &&
240+ { displayPapers &&
241241 < button
242242 onClick = { ( ) => {
243243 handleRemoveAll ( ) ;
@@ -254,7 +254,7 @@ function PinnedSearchBar({
254254 </ form >
255255 </ div >
256256 </ div >
257- { displayPapers . length > 0 &&
257+ { displayPapers &&
258258 < div className = "mt-2 hidden w-full md:block" >
259259 < div className = "ml-auto w-fit" >
260260 < button
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export default function SearchBar({
2626 displayPapers
2727} : {
2828 type ?: "default" | "pinned" ;
29- displayPapers : IUpcomingPaper [ ]
29+ displayPapers : boolean ;
3030} ) {
3131 const [ subjects , setSubjects ] = useState < string [ ] > ( [ ] ) ;
3232
You can’t perform that action at this time.
0 commit comments