Skip to content

Commit 2366086

Browse files
committed
fix(admin):fix empty state management when search yields no result
1 parent 9a4c553 commit 2366086

File tree

1 file changed

+6
-3
lines changed
  • packages/reva-admin-react/src/app/responsable-certifications/certifications/(list)

1 file changed

+6
-3
lines changed

packages/reva-admin-react/src/app/responsable-certifications/certifications/(list)/page.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,23 +153,26 @@ export default function RegistryManagerHomepage() {
153153

154154
if (
155155
status === "A_VALIDER_PAR_CERTIFICATEUR" &&
156-
certificationPage.rows.length === 0
156+
certificationPage.rows.length === 0 &&
157+
searchFilter === ""
157158
) {
158159
return <NoCertificationsToValidate />;
159160
}
160161

161162
if (
162163
status === "VALIDE_PAR_CERTIFICATEUR" &&
163164
visible &&
164-
certificationPage.rows.length === 0
165+
certificationPage.rows.length === 0 &&
166+
searchFilter === ""
165167
) {
166168
return <NoVisibleCertifications />;
167169
}
168170

169171
if (
170172
status === "VALIDE_PAR_CERTIFICATEUR" &&
171173
!visible &&
172-
certificationPage.rows.length === 0
174+
certificationPage.rows.length === 0 &&
175+
searchFilter === ""
173176
) {
174177
return <NoInvisibleCertifications />;
175178
}

0 commit comments

Comments
 (0)