From 9c22fac398ac1900ab274044e9583ba78de43100 Mon Sep 17 00:00:00 2001 From: Anand Suthar Date: Tue, 18 Jun 2024 21:52:07 +0530 Subject: [PATCH] refactor: passing the necessary user and role props to the Headbar component --- app/(pages)/receptionist/layout.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/(pages)/receptionist/layout.tsx b/app/(pages)/receptionist/layout.tsx index e565693f..8834a74f 100644 --- a/app/(pages)/receptionist/layout.tsx +++ b/app/(pages)/receptionist/layout.tsx @@ -1,21 +1,28 @@ -import { Headbar, Sidebar } from "./components"; +import { Receptionist } from "@/types"; +import { Sidebar } from "./components"; +import { Headbar } from "@components/index"; + import type { Metadata } from "next"; +import { getReceptionistData } from "@lib/receptionist"; export const metadata: Metadata = { title: "Patient Fitness Tracker", description: "The page is for receptionist related applications.", }; -export default function PatientLayout({ +export default async function PatientLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { + const receptionist: Receptionist = await getReceptionistData(); + return (
- + + {children}