This commit is contained in:
Sir Blob
2025-01-25 17:36:25 -05:00
parent 20d22440cd
commit e25124fe9d
8 changed files with 643 additions and 19 deletions

View File

@@ -0,0 +1,32 @@
"use client"
import { useState, useEffect } from 'react';
import axios from 'axios';
import { useUser } from '@clerk/nextjs';
import { IntenseChart } from "./IntensityChart"
import { MedicationTable } from "./MedicationTable"
export default function Dashboard() {
const { user } = useUser();
const [userData, setUserData] = useState(null);
useEffect(() => {
if (user) {
axios.get(`/api/user?userId=${user.id}`).then(response => {
setUserData(response.data);
});
}
}, [user]);
return (
<div className="container mx-auto">
<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">
<IntenseChart />
<MedicationTable medications={[]} />
</div>
</div>
)
}