home page updated

This commit was merged in pull request #13.
This commit is contained in:
victorAnumudu
2025-04-15 18:06:48 +01:00
parent d684281253
commit c699e17533
12 changed files with 421 additions and 163 deletions
+2 -151
View File
@@ -1,157 +1,8 @@
import React from 'react'
import BreadcrumbCom from '../components/breadcrumb/BreadcrumbCom'
import CustomCounter from '../components/CustomCounter'
import Icons from '../components/Icons'
import TableWrapper from '../components/tableWrapper/TableWrapper'
import Avatar from '../assets/user_avatar.jpg'
import { Widget1 } from '../components/home/Widget1'
import { Widget2 } from '../components/home/Widget2'
import HomeCom from '../components/home/HomeCom'
export default function HomePage() {
return (
<div className='w-full flex flex-col gap-8'>
<BreadcrumbCom title='Dashboard' paths={['Home', 'Dashboard']} />
<div className='grid grid-cols-1 gap-8'>
<div className='w-full grid grid-cols-1 xl:grid-cols-3 gap-8'>
<div className='box min-h-[230] justify-between bg-[#F7D9E3] dark:bg-black-box text-black-body dark:text-white-body'>
<p className='text-base sm:text-lg font-bold hover:text-primary'>Earnings</p>
{/* <Widget1 /> */}
<div className='flex gap-2 items-end font-bold'>
<p className='text-3xl sm:text-[39px]'><span className='text-xl sm:text-2xl'>$</span><CustomCounter targetNumber='47' timeInSeconds='1' /></p>
<p className='sm:text-[13.9px]'>- 12% this week</p>
</div>
</div>
<div className='box min-h-[230] justify-between bg-[#CBF0F5] dark:bg-black-box text-black-body dark:text-white-body'>
<p className='text-base sm:text-lg font-bold hover:text-primary'>Contributions</p>
{/* <Widget2 /> */}
<div className='flex gap-2 items-end font-bold'>
<p className='text-3xl sm:text-[39px]'><CustomCounter targetNumber='500' timeInSeconds='1' /></p>
<p className='sm:text-[13.9px]'>+ 56% this week</p>
</div>
</div>
<div className='box min-h-[230] justify-between bg-[#CBD4F4] dark:bg-black-box text-black-body dark:text-white-body'>
<p className='mb-4 text-base sm:text-lg font-bold hover:text-primary'>Summary</p>
<div className='grid grid-cols-2 gap-4 font-bold'>
<div className='flex items-center gap-2'>
<div className='w-10 h-10 bg-white-body dark:bg-black-box dark:shadow-[0_0_0_1px_#f9f9f9] rounded-md flex justify-center items-center'>
<Icons name='sales' />
</div>
<div>
<p className='font-bold text-base'>$<CustomCounter targetNumber='50' timeInSeconds='1' />K</p>
<p className='text-12 text-slate-500'>Sales</p>
</div>
</div>
<div className='flex items-center gap-2'>
<div className='w-10 h-10 bg-white-body dark:bg-black-box dark:shadow-[0_0_0_1px_#f9f9f9] rounded-md flex justify-center items-center'>
<Icons name='sales' />
</div>
<div>
<p className='font-bold text-base'>$<CustomCounter targetNumber='50' timeInSeconds='1' />K</p>
<p className='text-12 text-slate-500'>Revenue</p>
</div>
</div>
<div className='flex items-center gap-2'>
<div className='w-10 h-10 bg-white-body dark:bg-black-box dark:shadow-[0_0_0_1px_#f9f9f9] rounded-md flex justify-center items-center'>
<Icons name='sales' />
</div>
<div>
<p className='font-bold text-base'>$<CustomCounter targetNumber='265' timeInSeconds='1' />K</p>
<p className='text-12 text-slate-500'>Tickets</p>
</div>
</div>
<div className='flex items-center gap-2'>
<div className='w-10 h-10 bg-white-body dark:bg-black-box dark:shadow-[0_0_0_1px_#f9f9f9] rounded-md flex justify-center items-center'>
<Icons name='sales' />
</div>
<div>
<p className='font-bold text-base'>$<CustomCounter targetNumber='5' timeInSeconds='1' />M</p>
<p className='text-12 text-slate-500'>Tasks</p>
</div>
</div>
</div>
</div>
</div>
<div className='w-full'>
<div className='box gap-8 bg-white dark:bg-black-box text-black-body dark:text-white-body'>
<div className='grid grid-cols-1 xs:grid-cols-2 gap-4'>
<div className='flex flex-col gap-1 order-2 xs:order-1'>
<p className='font-bold text-base'>Members Statistics</p>
<p className='text-12'>Over 500 members</p>
</div>
<div className='order-1 xs:order-2 text-left xs:text-right'>
<button className='font-bold bg-white-aside text-black-body text-12 px-4 py-2 hover:text-primary hover:bg-sky-50 dark:hover:text-white dark:hover:bg-primary dark:text-white-body dark:bg-black-body rounded-md'>+ New Member</button>
</div>
</div>
<TableWrapper data={[1,2,3,4,5]} itemsPerPage={15}>
{({ data }) => (
<>
<table className="py-2 w-full text-sm">
<thead className="py-2 text-sm text-slate-500 text-left">
<tr>
<th scope="col" className="px-2 py-2">
Authors
</th>
<th scope="col" className="px-2">
Company
</th>
<th scope="col" className="px-2">
Progress
</th>
<th scope="col" className="px-2 text-right">
Action
</th>
</tr>
</thead>
<tbody>
{data.map(item => (
<tr className="py-2 border-t border-dashed border-slate-300">
<td className="px-2 py-2">
<div className='w-full min-w-48 flex items-center gap-2 whitespace-nowrap'>
<img className="w-10 h-10 rounded-md" src={Avatar} alt="Jese image" />
<div className="text-left">
<div className="text-base font-semibold">John Dummy</div>
<div className="font-normal text-gray-500">HTML, JS, ReactJS</div>
</div>
</div>
</td>
<td className="px-2">
<div className="text-left">
<div className="text-base font-semibold">chiefSoft</div>
<div className="font-normal text-gray-500">Web, UI/UX Design</div>
</div>
</td>
<td className="px-2">
<div className="text-left">
<div className="font-normal text-gray-500">50%</div>
<div className="relative h-[6px] w-full bg-white-body dark:bg-black-body rounded-full overflow-hidden">
<div className={`absolute left-0 h-full w-1/2 bg-emerald-600`}></div>
</div>
</div>
</td>
<td className="px-2 text-right">
<div className='flex items-center justify-end gap-3 md:gap-4'>
<div className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
<Icons name='edit' />
</div>
<div className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
<Icons name='eye' />
</div>
<div className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
<Icons name='trash' />
</div>
</div>
</td>
</tr>
))}
</tbody>
</table>
</>
)}
</TableWrapper>
</div>
</div>
</div>
</div>
<HomeCom />
)
}
+8
View File
@@ -0,0 +1,8 @@
import React from 'react'
import LoansCom from '../components/loanscom/LoansCom'
export default function LoansPage() {
return (
<LoansCom />
)
}
+8
View File
@@ -0,0 +1,8 @@
import React from 'react'
import RequestCom from '../components/request/RequestCom'
export default function RequestPage() {
return (
<RequestCom/>
)
}