feat: Implement a new dashboard layout with sidebar, introduce project and data source management, and add various UI components.
This commit is contained in:
@@ -3,20 +3,34 @@
|
||||
import { SignIn } from "@/components/auth/SignIn";
|
||||
import { Authenticated, Unauthenticated, useQuery } from "convex/react";
|
||||
import { api } from "@/convex/_generated/api";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export default function AuthPage() {
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gray-50">
|
||||
<div className="min-h-screen flex items-center justify-center bg-background">
|
||||
<Unauthenticated>
|
||||
<SignIn />
|
||||
</Unauthenticated>
|
||||
<Authenticated>
|
||||
<div className="text-center">
|
||||
<h1 className="text-2xl font-bold mb-4">You are logged in!</h1>
|
||||
<p>Redirecting...</p>
|
||||
{/* You could add a redirect here or a button to go to dashboard */}
|
||||
</div>
|
||||
<RedirectToDashboard />
|
||||
</Authenticated>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function RedirectToDashboard() {
|
||||
const router = useRouter();
|
||||
useEffect(() => {
|
||||
router.push("/dashboard");
|
||||
}, [router]);
|
||||
|
||||
return (
|
||||
<div className="text-center">
|
||||
<h1 className="text-2xl font-bold mb-4">You are logged in!</h1>
|
||||
<p>Redirecting to dashboard...</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user