@@ -16,17 +16,19 @@ const PAGE_SIZE = 15;
16
16
type CompaniesListProps = {
17
17
allCompanies : Company [ ] ;
18
18
updatedAtISODate : string ;
19
- allowSearchParams ?: boolean ;
19
+ showHeader ?: boolean ;
20
+ hideUpdatedAt ?: boolean ;
20
21
} ;
21
22
22
23
export default function CompaniesList ( {
23
24
allCompanies,
24
25
updatedAtISODate,
25
- allowSearchParams = true ,
26
+ showHeader = false ,
27
+ hideUpdatedAt,
26
28
} : CompaniesListProps ) {
27
29
const {
28
30
searchParams : { query, category, location, page } ,
29
- } = useSearchQueryParams ( allowSearchParams ) ;
31
+ } = useSearchQueryParams ( ) ;
30
32
31
33
const start = ( page - 1 ) * PAGE_SIZE ;
32
34
const end = start + PAGE_SIZE ;
@@ -56,7 +58,7 @@ export default function CompaniesList({
56
58
</ motion . div >
57
59
) : (
58
60
< div className = "flex-1 font-mono" aria-label = "Companies list" >
59
- { allowSearchParams && (
61
+ { showHeader && (
60
62
< motion . div
61
63
className = "mb-2 text-xs w-full flex flex-wrap items-center justify-between gap-2 text-muted-foreground"
62
64
initial = { { opacity : 0 , y : - 10 } }
@@ -67,11 +69,12 @@ export default function CompaniesList({
67
69
updatedAtISODate = { updatedAtISODate }
68
70
totalPages = { totalPages }
69
71
filteredCompanies = { filteredCompanies }
72
+ hideUpdatedAt = { hideUpdatedAt }
70
73
/>
71
74
</ motion . div >
72
75
) }
73
76
< div className = "flex-1 space-y-4" data-testid = "companies-list" >
74
- { paginatedCompanies . map ( ( company , index ) => (
77
+ { paginatedCompanies . map ( ( company , _index ) => (
75
78
< motion . div
76
79
key = { company . slug }
77
80
initial = { { opacity : 0 , y : 20 } }
0 commit comments