Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 692fe461c3 | |||
| 3f84eef132 |
Binary file not shown.
|
After Width: | Height: | Size: 441 KiB |
@@ -5,7 +5,9 @@ import { useNavigate, useLocation, Link } from "react-router-dom";
|
|||||||
import { handlePagingFunc } from "../Pagination/HandlePagination";
|
import { handlePagingFunc } from "../Pagination/HandlePagination";
|
||||||
import PaginatedList from "../Pagination/PaginatedList";
|
import PaginatedList from "../Pagination/PaginatedList";
|
||||||
|
|
||||||
export default function FamilyTable({ className, familyList, loader }) {
|
import familyImage from '../../assets/images/no-family-side.png'
|
||||||
|
|
||||||
|
export default function FamilyTable({ className, familyList, loader, popUpHandler }) {
|
||||||
const filterCategories = ["All Categories", "Explore", "Featured"];
|
const filterCategories = ["All Categories", "Explore", "Featured"];
|
||||||
const [selectedCategory, setCategory] = useState(filterCategories[0]);
|
const [selectedCategory, setCategory] = useState(filterCategories[0]);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -32,9 +34,11 @@ export default function FamilyTable({ className, familyList, loader }) {
|
|||||||
<div className="h-full min-h-[500px] w-full overflow-hidden flex justify-center items-center">
|
<div className="h-full min-h-[500px] w-full overflow-hidden flex justify-center items-center">
|
||||||
<LoadingSpinner size="16" color="sky-blue" />
|
<LoadingSpinner size="16" color="sky-blue" />
|
||||||
</div>
|
</div>
|
||||||
) : (
|
)
|
||||||
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400 relative">
|
:
|
||||||
<>
|
familyList?.length > 0 ?
|
||||||
|
(
|
||||||
|
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400 relative">
|
||||||
<thead className="sticky top-0">
|
<thead className="sticky top-0">
|
||||||
<tr className="text-base text-thin-light-gray whitespace-nowrap border-b dark:border-[#5356fb29] default-border-bottom ">
|
<tr className="text-base text-thin-light-gray whitespace-nowrap border-b dark:border-[#5356fb29] default-border-bottom ">
|
||||||
<th className="py-4">Name</th>
|
<th className="py-4">Name</th>
|
||||||
@@ -44,9 +48,7 @@ export default function FamilyTable({ className, familyList, loader }) {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody className="h-full">
|
<tbody className="h-full">
|
||||||
<>
|
{currentFamilyList?.map((props, idx) => {
|
||||||
{familyList?.length > 0 ? (
|
|
||||||
currentFamilyList?.map((props, idx) => {
|
|
||||||
let {
|
let {
|
||||||
firstname,
|
firstname,
|
||||||
lastname,
|
lastname,
|
||||||
@@ -115,18 +117,29 @@ export default function FamilyTable({ className, familyList, loader }) {
|
|||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
) : (
|
}
|
||||||
<tr className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
|
|
||||||
<td className="p-2" colSpan="4">
|
|
||||||
No Family Accounts Found!
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</>
|
</table>
|
||||||
</table>
|
)
|
||||||
)}
|
:
|
||||||
|
(
|
||||||
|
<div className="font-bold text-center text-xl md:text-2xl lg:text-4xl text-dark-gray md:flex items-center justify-between">
|
||||||
|
<div className="p-2 w-full md:w-1/2">
|
||||||
|
<p className="mb-4 p-3 md:p-16">Add your family, assign tasks, and get the whole team engaged.</p>
|
||||||
|
<button
|
||||||
|
onClick={popUpHandler}
|
||||||
|
type="button"
|
||||||
|
className="text-white btn-gradient text-lg tracking-wide px-5 py-2 rounded-full"
|
||||||
|
>
|
||||||
|
Add Family
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div className="p-2 w-full md:w-1/2">
|
||||||
|
<img className='w-full' src={familyImage} alt="A Family" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
{/* PAGINATION BUTTON */}
|
{/* PAGINATION BUTTON */}
|
||||||
<PaginatedList
|
<PaginatedList
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ export default function FamilyAcc() {
|
|||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<FamilyTable familyList={familyList} loader={loader} />
|
<FamilyTable familyList={familyList} loader={loader} popUpHandler={popUpHandler} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{popUp && (
|
{popUp && (
|
||||||
|
|||||||
Reference in New Issue
Block a user