add prettier formatter to all file
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import AddDoctorPage from "@/components/panel/addDoctor";
|
||||
import Information from '@/data/information.json';
|
||||
import Information from "@/data/information.json";
|
||||
|
||||
function AddDoctor() {
|
||||
return (
|
||||
<AddDoctorPage data={Information} />
|
||||
)
|
||||
return <AddDoctorPage data={Information} />;
|
||||
}
|
||||
|
||||
export default AddDoctor
|
||||
export default AddDoctor;
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
'use client';
|
||||
"use client";
|
||||
|
||||
import DashboardPage from "@/components/panel/dashboard";
|
||||
import Information from '@/data/information.json';
|
||||
import Information from "@/data/information.json";
|
||||
|
||||
function Dashboard() {
|
||||
return (
|
||||
<DashboardPage data={Information} />
|
||||
)
|
||||
return <DashboardPage data={Information} />;
|
||||
}
|
||||
|
||||
export default Dashboard
|
||||
export default Dashboard;
|
||||
|
||||
@@ -1,60 +1,62 @@
|
||||
'use client';
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import Header from "@/components/layoutPanel/header";
|
||||
import Sidebar from "@/components/layoutPanel/sidebar";
|
||||
import Information from '@/data/information.json';
|
||||
import Information from "@/data/information.json";
|
||||
import UserDetail from "@/components/layoutPanel/userDetail";
|
||||
import { usePathname } from "next/navigation";
|
||||
import BgGray from "@/components/layoutPanel/sidebar/BgGray";
|
||||
|
||||
function LayoutPanel({ children }) {
|
||||
const pathname = usePathname();
|
||||
const [active, setActive] = useState(false);
|
||||
const [open, setOpen] = useState(false);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
const pathname = usePathname();
|
||||
const [active, setActive] = useState(false);
|
||||
const [open, setOpen] = useState(false);
|
||||
const [loading, setLoading] = useState(true);
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
setLoading(false);
|
||||
}, 2000);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
setLoading(false);
|
||||
}, 2000);
|
||||
}, []);
|
||||
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen">
|
||||
<Sidebar
|
||||
open={open}
|
||||
active={active}
|
||||
setOpen={setOpen}
|
||||
setActive={setActive}
|
||||
/>
|
||||
<BgGray isActive={active} setIsActive={setActive} />
|
||||
<main className={`
|
||||
return (
|
||||
<div className="flex min-h-screen">
|
||||
<Sidebar
|
||||
open={open}
|
||||
active={active}
|
||||
setOpen={setOpen}
|
||||
setActive={setActive}
|
||||
/>
|
||||
<BgGray isActive={active} setIsActive={setActive} />
|
||||
<main
|
||||
className={`
|
||||
w-full transition-all duration-500
|
||||
${pathname.includes('dashboard') ?
|
||||
(open ?
|
||||
'md:min-w-[calc(100%_-_243px)] md:w-[calc(100%_-_243px)] xl:min-w-[calc(100%_-_243px_-_332px)] xl:w-[calc(100%_-_243px_-_332px)]' :
|
||||
'md:min-w-[calc(100%_-_96px)] md:w-[calc(100%_-_96px)] xl:min-w-[calc(100%_-_96px_-_332px)] xl:w-[calc(100%_-_96px_-_332px)]'
|
||||
) : (open ?
|
||||
'md:w-[calc(100%-243px)]' :
|
||||
'md:w-[calc(100%-96px)]')}
|
||||
`}>
|
||||
<Header
|
||||
data={Information}
|
||||
setActive={setActive}
|
||||
disableProfile={pathname.includes('dashboard')}
|
||||
/>
|
||||
<section className="my-[24px] opacity-element mx-[16px] bg-[#FAFAFA]">
|
||||
{children}
|
||||
</section>
|
||||
</main>
|
||||
{pathname.includes('dashboard') && (
|
||||
<UserDetail data={Information} loading={loading} />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
${
|
||||
pathname.includes("dashboard")
|
||||
? open
|
||||
? "md:min-w-[calc(100%_-_243px)] md:w-[calc(100%_-_243px)] xl:min-w-[calc(100%_-_243px_-_332px)] xl:w-[calc(100%_-_243px_-_332px)]"
|
||||
: "md:min-w-[calc(100%_-_96px)] md:w-[calc(100%_-_96px)] xl:min-w-[calc(100%_-_96px_-_332px)] xl:w-[calc(100%_-_96px_-_332px)]"
|
||||
: open
|
||||
? "md:w-[calc(100%-243px)]"
|
||||
: "md:w-[calc(100%-96px)]"
|
||||
}
|
||||
`}
|
||||
>
|
||||
<Header
|
||||
data={Information}
|
||||
setActive={setActive}
|
||||
disableProfile={pathname.includes("dashboard")}
|
||||
/>
|
||||
<section className="my-[24px] opacity-element mx-[16px] bg-[#FAFAFA]">
|
||||
{children}
|
||||
</section>
|
||||
</main>
|
||||
{pathname.includes("dashboard") && (
|
||||
<UserDetail data={Information} loading={loading} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default LayoutPanel
|
||||
export default LayoutPanel;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import TurnsPage from '@/components/panel/turns'
|
||||
import Information from '@/data/information.json';
|
||||
import TurnsPage from "@/components/panel/turns";
|
||||
import Information from "@/data/information.json";
|
||||
|
||||
function page() {
|
||||
return (
|
||||
<TurnsPage data={Information} />
|
||||
)
|
||||
return <TurnsPage data={Information} />;
|
||||
}
|
||||
|
||||
export default page
|
||||
export default page;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import UserAccountPage from "@/components/panel/userAccount"
|
||||
import Information from '@/data/information.json';
|
||||
import UserAccountPage from "@/components/panel/userAccount";
|
||||
import Information from "@/data/information.json";
|
||||
|
||||
function UserAccount() {
|
||||
return (
|
||||
<UserAccountPage data={Information} />
|
||||
)
|
||||
return <UserAccountPage data={Information} />;
|
||||
}
|
||||
|
||||
export default UserAccount
|
||||
export default UserAccount;
|
||||
|
||||
Reference in New Issue
Block a user