yippe 2
This commit is contained in:
@@ -1,12 +1,5 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import {
|
|
||||||
ColumnDef,
|
|
||||||
flexRender,
|
|
||||||
getCoreRowModel,
|
|
||||||
useReactTable,
|
|
||||||
} from "@tanstack/react-table"
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Table,
|
Table,
|
||||||
TableBody,
|
TableBody,
|
||||||
@@ -16,13 +9,8 @@ import {
|
|||||||
TableRow,
|
TableRow,
|
||||||
} from "@/components/ui/table"
|
} from "@/components/ui/table"
|
||||||
|
|
||||||
export function MedicationTable(medications) {
|
export function MedicationTable({medications}) {
|
||||||
|
|
||||||
|
|
||||||
if (!userData) return <div>Loading...</div>;
|
|
||||||
|
|
||||||
console.log(userData);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="rounded-md border">
|
<div className="rounded-md border">
|
||||||
<Table>
|
<Table>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useUser } from '@clerk/nextjs';
|
import { useUser } from '@clerk/nextjs';
|
||||||
@@ -24,7 +25,7 @@ export default function Dashboard() {
|
|||||||
<h1 className="text-3xl font-semibold mb-6">Dashboard</h1>
|
<h1 className="text-3xl font-semibold mb-6">Dashboard</h1>
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||||
<IntenseChart />
|
<IntenseChart />
|
||||||
<MedicationTable medications={[]} />
|
<MedicationTable medications={userData ? userData.medications : []} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user