auth stuff

This commit is contained in:
Sir Blob
2025-01-26 03:31:43 -05:00
parent aa86349d41
commit 84fe04f3c4
6 changed files with 78 additions and 7 deletions

View File

@@ -12,7 +12,10 @@ import { ChevronDown } from "lucide-react"
import { PersonForm } from './PatientForm';
import { useRouter } from 'next/navigation';
const AccountPage = () => {
const router = useRouter();
const { user } = useUser();
const [userData, setUserData] = useState(null);
const [patients, setPatients] = useState([]);
@@ -40,7 +43,9 @@ const AccountPage = () => {
}
};
if (!userData) return <div>Loading...</div>;
if (!userData) {
router.push('/');
}
return (
<div className="container mx-auto p-4">