Skip to content

Commit

Permalink
refactor: passing the necessary user and role props to the Headbar co…
Browse files Browse the repository at this point in the history
…mponent
  • Loading branch information
ad956 committed Jun 18, 2024
1 parent 5df49b7 commit 9c22fac
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/(pages)/receptionist/layout.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<main className="h-[100vh] flex">
<Sidebar />
<section className="flex flex-col w-full">
<Headbar />
<Headbar user={receptionist} role="receptionist" />

{children}
</section>
</main>
Expand Down

0 comments on commit 9c22fac

Please sign in to comment.