-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(#404): add skeleton loader on login activities table
- Loading branch information
1 parent
9e05149
commit 9fa6bf3
Showing
2 changed files
with
129 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react'; | ||
import Skeleton from 'react-loading-skeleton'; | ||
import 'react-loading-skeleton/dist/skeleton.css'; | ||
|
||
export default function LoginActivitiesSkeleton() { | ||
// Define an array with unique keys | ||
const skeletonRows = [{ id: 'row-1' }, { id: 'row-2' }, { id: 'row-3' }]; | ||
|
||
return ( | ||
<div className="w-full p-4 overflow-auto"> | ||
<table className="w-full table-fixed border border-gray-700 min-w-[600px]"> | ||
<thead className="bg-[#27167439] text-white"> | ||
<tr> | ||
<th className="p-4 border text-center w-1/6">Date</th> | ||
<th className="p-4 border text-center w-1/6">Country Name</th> | ||
<th className="p-4 border text-center w-1/6">City</th> | ||
<th className="p-4 border text-center w-1/6">State</th> | ||
<th className="p-4 border text-center w-1/6">IPV4</th> | ||
<th className="p-4 border text-center w-1/6">Attempt</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{skeletonRows.map((row) => ( | ||
<tr key={row.id}> | ||
<td className="py-2 px-4 border"> | ||
<Skeleton height={35} width="100%" /> | ||
</td> | ||
<td className="py-2 px-4 border"> | ||
<Skeleton height={35} width="100%" /> | ||
</td> | ||
<td className="py-2 px-4 border"> | ||
<Skeleton height={35} width="100%" /> | ||
</td> | ||
<td className="py-2 px-4 border"> | ||
<Skeleton height={35} width="100%" /> | ||
</td> | ||
<td className="py-2 px-4 border"> | ||
<Skeleton height={35} width="100%" /> | ||
</td> | ||
<td className="py-2 px-4 border"> | ||
<Skeleton height={35} width="100%" /> | ||
</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters