change layout and router panel & design page dashboard and user account

This commit is contained in:
Ehsan
2024-09-10 21:38:07 +03:30
parent dffdab7139
commit 62b355e52f
44 changed files with 370 additions and 97 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import Icons from "./Icons"
import Search from "./Search"
function index() {
function Header() {
return (
<div
className='
@@ -15,4 +15,4 @@ function index() {
)
}
export default index
export default Header
+24 -20
View File
@@ -1,20 +1,23 @@
import Link from "next/link";
import { Button } from "@mui/material";
import { usePathname } from "next/navigation";
// Icons
import CalendarP from "@/components/icons/CalendarP";
import CategoryP from "@/components/icons/CategoryP";
import ProfileAddP from "@/components/icons/ProfileAddP";
import ProfileCircleP from "@/components/icons/ProfileCircleP";
import { Button } from "@mui/material";
import { useState } from "react";
function Links() {
const list = [
{ name: 'دشبورد', icon: <CategoryP /> },
{ name: 'حساب کاربری', icon: <ProfileCircleP /> },
{ name: 'اضافه کردن پزشک', icon: <ProfileAddP /> },
{ name: 'نوبت ها', icon: <CalendarP /> }
{ name: 'دشبورد', src: '/panel/dashboard', icon: <CategoryP /> },
{ name: 'حساب کاربری', src: '/panel/user-account', icon: <ProfileCircleP /> },
{ name: 'اضافه کردن پزشک', src: '/', icon: <ProfileAddP /> },
{ name: 'نوبت ها', src: '/', icon: <CalendarP /> }
];
const [value, setValue] = useState(0);
const pathname = usePathname();
return (
<ul className="flex flex-col gap-[32px] mt-[54px]">
@@ -23,21 +26,22 @@ function Links() {
key={idx}
className="p-[8px]"
>
<Button
fullWidth
variant="text"
onClick={() => setValue(idx)}
className={`
<Link href={item.src}>
<Button
fullWidth
variant="text"
className={`
!p-[8px] !flex !items-center !justify-start !gap-[8px] !text-[16px] !rounded-[8px] !transition-all !duration-500
${idx === value ? '!bg-[#5559CE] !text-[#FAFAFA] !font-bold' : '!text-[#525252] !font-medium'}
`}
>
${item.src === pathname ? '!bg-[#5559CE] !text-[#FAFAFA] !font-bold' : '!text-[#525252] !font-medium'}
`}
>
<div className="p-[4px] bg-[#E5E9FF] rounded-[4px] w-fit">
{item.icon}
</div>
{item.name}
</Button>
<div className="p-[4px] bg-[#E5E9FF] rounded-[4px] w-fit">
{item.icon}
</div>
{item.name}
</Button>
</Link>
</li>
))}
</ul>
+1 -1
View File
@@ -4,7 +4,7 @@ import Activities from "./Activities";
function UserDetail({ data }) {
return (
<div className="min-w-[360px] h-full">
<div className="min-w-[360px] h-full opacity-page">
<div
className="min-w-[360px] p-[24px] border-0 border-r border-r-[#EFEFEF] h-full items-start fixed top-0 left-0
bg-[#FFF] py-[40px] px-[16px]"