diff --git a/frontend/public/images/dragon-cant-find.png b/frontend/public/images/dragon-cant-find.png deleted file mode 100644 index a6cde8dcb..000000000 Binary files a/frontend/public/images/dragon-cant-find.png and /dev/null differ diff --git a/frontend/public/images/dragon-cant-find.svg b/frontend/public/images/dragon-cant-find.svg new file mode 100644 index 000000000..8a6eed443 --- /dev/null +++ b/frontend/public/images/dragon-cant-find.svg @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/pages/noprojects.tsx b/frontend/src/pages/noprojects.tsx index addcaadaf..5d3073f97 100644 --- a/frontend/src/pages/noprojects.tsx +++ b/frontend/src/pages/noprojects.tsx @@ -1,19 +1,40 @@ +import { useEffect } from 'react'; import Image from 'next/image'; +import { useRouter } from 'next/router'; +import Button from '~/components/basic/buttons/Button'; import { getTranslatedServerSideProps } from '~/utilities/withTranslateProps'; +import getWorkspaces from './api/workspace/getWorkspaces'; + export default function NoProjects() { + const router = useRouter(); + + const redirectUser = async () => { + const workspaces = await getWorkspaces(); + if (workspaces.length > 0) { + router.push('/dashboard/' + workspaces[0]._id); + } + } + + useEffect(() => { + // on initial load - run auth check + (async () => { + await redirectUser() + })(); + }, []); + return (
-
+
google logo
-
+
You are not part of any projects in this organization yet. When you do, they will appear here. @@ -22,6 +43,9 @@ export default function NoProjects() { Create a new project, or ask other organization members to give you neccessary permissions.
+
+
);