-
-
- Failed
-
- {record.error &&
{JSON.stringify(record.error)}}
+ const renderStatusCell = (record: UserData) => {
+ if (!record.isValid) {
+ return (
+
+
+
+ Invalid
- );
- },
- },
- ];
+ {record.error &&
{record.error}}
+
+ );
+ }
+ if (!record.status || record.status === "pending") {
+ return
Pending;
+ }
+ if (record.status === "success") {
+ return (
+
+
+
+ Success
+
+ {record.invitation_link && (
+
+
+ {record.invitation_link}
+ NotificationsManager.success("Invitation link copied!")}
+ >
+
+
+
+
+ )}
+
+ );
+ }
+ return (
+
+
+
+ Failed
+
+ {record.error &&
{JSON.stringify(record.error)}}
+
+ );
+ };
+
+ const pageCount = Math.max(1, Math.ceil(parsedData.length / PREVIEW_PAGE_SIZE));
+ const currentPage = Math.min(pageIndex, pageCount - 1);
+ const visibleRows = parsedData.slice(currentPage * PREVIEW_PAGE_SIZE, (currentPage + 1) * PREVIEW_PAGE_SIZE);
return (
<>
-