Skip to content

Commit

Permalink
fix try errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenreup committed Nov 13, 2024
1 parent 6e19b5f commit ef10476
Show file tree
Hide file tree
Showing 7 changed files with 383 additions and 395 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@headlessui/react": "^2.0.4",
"@headlessui/react": "0.0.0-insiders.d71fb9c",
"@hookform/resolvers": "^3.3.1",
"@radix-ui/react-avatar": "^1.1.1",
"@radix-ui/react-collapsible": "^1.1.0",
Expand All @@ -24,9 +24,6 @@
"@smile-cdr/fhirts": "^2.0.7",
"@tailwindcss/typography": "^0.5.15",
"@tanstack/react-query": "^4.33.0",
"@types/node": "20.5.7",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
"autoprefixer": "10.4.15",
"axios": "^1.5.0",
"class-variance-authority": "^0.7.0",
Expand Down Expand Up @@ -58,8 +55,11 @@
"zod": "^3.22.2"
},
"devDependencies": {
"@types/node": "20.5.7",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.1",
"@types/crypto-js": "^4.2.2",
"@types/string-template": "^1.0.2",
"daisyui": "^3.6.4"
}
}
}
736 changes: 360 additions & 376 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/app/(dashboard)/patients/[id]/[list]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export default async function Page({
params,
}: {
params: { list: string; id: string };
params: Promise<{ list: string; id: string }>;
}) {
return <div>{params.list}</div>;
const { list } = await params;
return <div>{list}</div>;
}
15 changes: 8 additions & 7 deletions src/app/(dashboard)/patients/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ type TabItem = {
show: boolean;
};

export default async function Page({ params }: { params: { id: string } }) {
const {
carePlanData: carePlan,
patient,
duplicates,
} = await fetchData(params.id);
export default async function Page({
params,
}: {
params: Promise<{ id: string }>;
}) {
const { id } = await params;
const { carePlanData: carePlan, patient, duplicates } = await fetchData(id);

const tabs: TabItem[] = [
{ title: "Care Plan", id: "general", show: true },
Expand Down Expand Up @@ -56,7 +57,7 @@ export default async function Page({ params }: { params: { id: string } }) {
</Tab>
))}
<div className="flex flex-row justify-end flex-1">
<Link href={`${params.id}/visits`} className="btn btn-secondary">
<Link href={`${id}/visits`} className="btn btn-secondary">
Visits
</Link>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/app/(dashboard)/patients/[id]/visits/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { fetchData } from "./fetch";
import Link from "next/link";

type Props = {
params: { id: string };
params: Promise<{ id: string }>;
};

const Visits = async ({ params: { id } }: Props) => {
const Visits = async ({ params }: Props) => {
const { id } = await params;
const data = await fetchData(id);
return (
<div className="container">
Expand Down
2 changes: 1 addition & 1 deletion src/app/(dashboard)/patients/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Content from "./content";
export default async function Page({
searchParams,
}: {
searchParams: { q: string };
searchParams: Promise<{ q: string }>;
}) {
const data = await fetchRequiredData();
return (
Expand Down
5 changes: 3 additions & 2 deletions src/app/(dashboard)/visit/[careplan]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { fetchData, onCarePlanStatusChange } from "./action";
import Components from "./component";

type Props = {
params: { careplan: string };
params: Promise<{ careplan: string }>;
};

const Page = async ({ params: { careplan } }: Props) => {
const Page = async ({ params }: Props) => {
const { careplan } = await params;
const data = await fetchData(careplan);
return (
<div className="container">
Expand Down

0 comments on commit ef10476

Please sign in to comment.