-
-
-
-
-
{
- if (isSidebarExpanded) setSidebarExpanded(false);
- }}
- >
- {children}
+ <>
+
-
+ >
);
}
diff --git a/src/app/(main)/page.tsx b/src/app/(main)/page.tsx
index 944b6941..04ab8f35 100644
--- a/src/app/(main)/page.tsx
+++ b/src/app/(main)/page.tsx
@@ -1,43 +1,20 @@
-"use client";
import { Project } from "@/types/project";
-import { API, paginatedResponse } from "@/utils/api";
-import { useQuery } from "@tanstack/react-query";
-import { useRouter } from "next/navigation";
-import { useEffect } from "react";
+import { API } from "@/utils/api";
+import { redirect } from "next/navigation";
+import Client from "./client";
-export default function Page() {
- const projectsQuery = useQuery
>({
- queryKey: ["projects"],
- queryFn: () => API.projects.list()
- });
- const router = useRouter();
-
- useEffect(() => {
- const defaultProject = projectsQuery.data?.results?.find(
- (project: Project) => project.is_default,
- );
- if (defaultProject) router.push(`/project/${defaultProject.external_id}`);
- }, [projectsQuery.data]);
+const getDefaultProject = async () => {
+ const projects = await API.projects.list();
+ return projects.results.find((project: Project) => project.is_default);
+}
- return (
-
- {projectsQuery.isLoading && (
-
- )}
+export default async function Page() {
+ try {
+ const defaultProject = await getDefaultProject();
+ if (defaultProject) redirect(`/project/${defaultProject.external_id}`);
+ } catch (error) {
+ console.log(error);
+ }
- {!projectsQuery.isLoading &&
- !projectsQuery.data?.results?.find(
- (project: Project) => project.is_default,
- ) && (
-
-
-
No default project found
-
- )}
-
- );
+ return
}
diff --git a/src/app/globals.css b/src/app/globals.css
index 5f39b3e1..493f2d88 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -2,25 +2,34 @@
@tailwind components;
@tailwind utilities;
-#scrollableDiv::-webkit-scrollbar {
-width: 0.5em;
+*::-webkit-scrollbar {
+ width: 0.5em;
}
-#scrollableDiv::-webkit-scrollbar-track {
-background: #f3f4f6;
+*::-webkit-scrollbar-track {
+ background: transparent;
}
-#scrollableDiv::-webkit-scrollbar-thumb {
-background: #d1d5db;
-border-radius: 0.5em;
+*::-webkit-scrollbar-thumb {
+ background: rgba(0, 0, 0, 0.1);
+ border-radius: 0.5em;
+ transition: 0.2s;
}
-#scrollableDiv::-webkit-scrollbar-thumb:hover {
-background: #bdc0c4;
+*::-webkit-scrollbar-thumb:hover {
+ background: rgba(0, 0, 0, 0.2);
}
-#scrollableDiv::-webkit-scrollbar-corner {
-background: #f3f4f6;
+*::-webkit-scrollbar-corner {
+ background: #f3f4f6;
+}
+
+.hover-scrollbar::-webkit-scrollbar {
+ display: none;
+}
+
+.hover-scrollbar:hover::-webkit-scrollbar {
+ display: block;
}
@@ -174,3 +183,15 @@ input:checked+.switch-slider:before {
-ms-transform: translateX(26px);
transform: translateX(26px);
}
+
+.button-bold {
+ @apply bg-white text-black px-10 py-4 text-2xl rounded-xl transition-all font-black border-2 border-white hover:bg-white/90
+}
+
+.button-bold-hollow {
+ @apply bg-transparent text-white px-10 py-4 text-2xl rounded-xl transition-all font-black border-2 border-white hover:bg-white/40
+}
+
+.button-bold-transparent {
+ @apply bg-transparent text-white px-10 py-4 text-2xl rounded-xl transition-all font-black border-2 border-transparent hover:bg-white/15
+}
\ No newline at end of file
diff --git a/src/app/home/page.tsx b/src/app/home/page.tsx
new file mode 100644
index 00000000..51426244
--- /dev/null
+++ b/src/app/home/page.tsx
@@ -0,0 +1,83 @@
+"use client"
+
+import { ShaderGradientCanvas, ShaderGradient } from 'shadergradient'
+import * as reactSpring from '@react-spring/three'
+import * as drei from '@react-three/drei'
+import * as fiber from '@react-three/fiber'
+import Link from 'next/link'
+
+export default function Home() {
+ return (
+
+
+
+
+
+
+
+
+
+
+ Revolutionizing medical diagnosis through AI and Opensource
+
+
+
+
+ Get Started
+
+
+ Login
+
+
+
+ Contribute
+
+
+
+
+
+ Powered By
+
+
+
+ Open Healthcare Network is an open-source public utility designed by a multi-disciplinary team of innovators and volunteers. Open Healthcare Network CARE is a Digital Public Good recognised by the United Nations.
+
+
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 4e7a8837..fc64a923 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -5,6 +5,11 @@ import { Suspense } from "react";
export const metadata = {
title: process.env.NEXT_PUBLIC_AI_NAME,
+ description: process.env.NEXT_PUBLIC_AI_DESCRIPTION || "Revolutionizing medical diagnosis through AI and Opensource",
+ metadataBase: new URL(process.env.NEXT_PUBLIC_DOMAIN ?
+ 'https://' + process.env.NEXT_PUBLIC_DOMAIN :
+ "http://localhost:3000"
+ ),
};
export default function RootLayout({
@@ -23,9 +28,7 @@ export default function RootLayout({
-
- {children}
-
+ {children}