import { useEffect } from "react"; import Head from "next/head"; import Image from "next/image"; import { useRouter } from "next/router"; import Button from "@app/components/basic/buttons/Button"; import getOrganizationUserProjects from "./api/organization/GetOrgUserProjects"; export default function NoProjects() { const router = useRouter(); const redirectUser = async () => { const workspaces = await getOrganizationUserProjects({ orgId: String(localStorage.getItem("orgData.id")) }); if (workspaces.length > 0) { router.push(`/dashboard/${workspaces[0]._id}`); } }; useEffect(() => { // on initial load - run auth check (async () => { await redirectUser(); })(); }, []); return (
No Projects | Infisical
google logo
You are not part of any projects in this organization yet. When you are, they will appear here.
Create a new project, or ask other organization members to give you necessary permissions.
); } NoProjects.requireAuth = true;