diff --git a/src/app/page.tsx b/src/app/page.tsx
index d92756c..c8f67e7 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -44,27 +44,37 @@ const footerAnimationStates = {
};
export default function Home() {
+ const { isSignedIn, orgId, orgSlug, userId } = useAuth();
+
+ return isSignedIn ? (
+
+ ) : (
+
+ );
+}
+
+const AuthenticatedHome = ({
+ isSignedIn,
+ orgId,
+ orgSlug,
+ userId,
+}: {
+ isSignedIn: boolean;
+ orgId: string;
+ orgSlug: string;
+ userId: string;
+}) => {
const [input, setInput] = useState("");
- const router = useRouter();
- const controls = useAnimation();
- const [ref, inView] = useInView();
- useEffect(() => {
- if (inView) {
- controls.start("visible");
- } else {
- controls.start("hidden");
- }
- }, [controls, inView]);
const [chatType, setChattype] = useQueryState(
"model",
parseAsString.withDefault("chat"),
);
-
- const { isSignedIn, orgId, orgSlug, userId } = useAuth();
- // if (isSignedIn) {
- // redirect("/dashboard/user");
- // }
-
+ const router = useRouter();
const handleInputChange = (e: any) => {
setInput(e.target.value);
navigator.clipboard.writeText(e.target.value);
@@ -88,6 +98,79 @@ export default function Home() {
}
};
+ return (
+
+
+
+
+
+
+
+
+
+
+ Hello Innovator,
+
+
+ Let's hyper-accelerate your research.
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const UnAuthenticatedHome = ({ isSignedIn }: { isSignedIn: boolean }) => {
+ const controls = useAnimation();
+ const [ref, inView] = useInView();
+ useEffect(() => {
+ if (inView) {
+ controls.start("visible");
+ } else {
+ controls.start("hidden");
+ }
+ }, [controls, inView]);
return (
@@ -117,42 +200,13 @@ export default function Home() {
Let's hyper-accelerate your research.
- {isSignedIn && orgId && orgSlug ? (
-
- ) : (
-
-
- Dashboard
-
- )}
+
+
+ Dashboard
+
{isSignedIn || (
);
-}
+};