diff --git a/apps/platform/public/svg/dashboard/folder.svg b/apps/platform/public/svg/dashboard/folder.svg new file mode 100644 index 00000000..80a51e43 --- /dev/null +++ b/apps/platform/public/svg/dashboard/folder.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/platform/public/svg/dashboard/index.ts b/apps/platform/public/svg/dashboard/index.ts index 8c0d73cc..9354166a 100644 --- a/apps/platform/public/svg/dashboard/index.ts +++ b/apps/platform/public/svg/dashboard/index.ts @@ -1,5 +1,6 @@ import EnvironmentSVG from './environment.svg' import ConfigSVG from './config.svg' import SecretSVG from './secret.svg' +import FolderSVG from './folder.svg' -export { EnvironmentSVG, ConfigSVG, SecretSVG } +export { EnvironmentSVG, ConfigSVG, SecretSVG, FolderSVG } diff --git a/apps/platform/src/app/(main)/page.tsx b/apps/platform/src/app/(main)/page.tsx index 58539509..33071a39 100644 --- a/apps/platform/src/app/(main)/page.tsx +++ b/apps/platform/src/app/(main)/page.tsx @@ -3,6 +3,7 @@ import { useEffect, useState } from 'react' import { toast } from 'sonner' import { useRouter } from 'next/navigation' import { AddSVG } from '@public/svg/shared' +import { FolderSVG } from '@public/svg/dashboard' import ProjectCard from '@/components/dashboard/projectCard' import { Sheet, @@ -30,6 +31,7 @@ import { Projects } from '@/lib/api-functions/projects' export default function Index(): JSX.Element { const [isSheetOpen, setIsSheetOpen] = useState(false) + const [isProjectEmpty, setIsProjectEmpty] = useState(true) const [projects, setProjects] = useState([]) const [newProjectData, setNewProjectData] = useState({ name: '', @@ -68,6 +70,7 @@ export default function Index(): JSX.Element { .then((data: ProjectWithoutKeys[] | [] | undefined) => { if (data) { setProjects(data) + setIsProjectEmpty(data.length === 0) } }) .catch((error) => { @@ -79,15 +82,20 @@ export default function Index(): JSX.Element { return (
-

My Projects

+ {!isProjectEmpty && ( +

My Projects

+ )} - - - + {!isProjectEmpty && ( + + + + )} + Create a new project @@ -155,7 +163,7 @@ export default function Index(): JSX.Element {
- {projects.length !== 0 ? ( + {!isProjectEmpty ? (
{projects.map((project: ProjectWithoutKeys) => { return ( @@ -173,8 +181,13 @@ export default function Index(): JSX.Element { })}
) : ( -
-
No projects yet? Get started by creating a new project.
+
+ +
Start your First Project
+
+ Create a file and start setting up your environment and secret keys +
+
)}