We have put together some resources to help you get started. Please find them below:
diff --git a/apps/app/.env.example b/apps/app/.env.example index 371a64c80..1e2576dfc 100644 --- a/apps/app/.env.example +++ b/apps/app/.env.example @@ -5,4 +5,6 @@ NEXT_PUBLIC_GITHUB_APP_NAME="" NEXT_PUBLIC_GITHUB_ID="" NEXT_PUBLIC_SENTRY_DSN="" NEXT_PUBLIC_ENABLE_OAUTH=0 -NEXT_PUBLIC_ENABLE_SENTRY=0 \ No newline at end of file +NEXT_PUBLIC_ENABLE_SENTRY=0 +NEXT_PUBLIC_ENABLE_SESSION_RECORDER=0 +NEXT_PUBLIC_TRACK_EVENTS=0 \ No newline at end of file diff --git a/apps/app/components/account/email-code-form.tsx b/apps/app/components/account/email-code-form.tsx index 9fad9c969..5e4c49b1a 100644 --- a/apps/app/components/account/email-code-form.tsx +++ b/apps/app/components/account/email-code-form.tsx @@ -180,7 +180,6 @@ export const EmailCodeForm = ({ onSuccess }: any) => { ) : (
- You have signed in as {user.email}.{" "} +
+ You have signed in as {user.email}.
Sign in
{" "}
with different account that has access to this page.
+
You need to{" "} Sign in diff --git a/apps/app/components/auth-screens/project/index.ts b/apps/app/components/auth-screens/project/index.ts new file mode 100644 index 000000000..1fb77e697 --- /dev/null +++ b/apps/app/components/auth-screens/project/index.ts @@ -0,0 +1 @@ +export * from "./join-project"; diff --git a/apps/app/components/auth-screens/project/join-project.tsx b/apps/app/components/auth-screens/project/join-project.tsx new file mode 100644 index 000000000..1c2018db0 --- /dev/null +++ b/apps/app/components/auth-screens/project/join-project.tsx @@ -0,0 +1,64 @@ +import { useState } from "react"; + +import Image from "next/image"; +import { useRouter } from "next/router"; + +import { mutate } from "swr"; + +// ui +import { PrimaryButton } from "components/ui"; +// icon +import { AssignmentClipboardIcon } from "components/icons"; +// img +import JoinProjectImg from "public/auth/project-not-authorized.svg"; +import projectService from "services/project.service"; +// fetch-keys +import { PROJECT_MEMBERS } from "constants/fetch-keys"; + +export const JoinProject: React.FC = () => { + const [isJoiningProject, setIsJoiningProject] = useState(false); + + const router = useRouter(); + const { workspaceSlug, projectId } = router.query; + + const handleJoin = () => { + setIsJoiningProject(true); + projectService + .joinProject(workspaceSlug as string, { + project_ids: [projectId as string], + }) + .then(() => { + mutate(PROJECT_MEMBERS(projectId as string)); + }) + .catch((err) => { + console.error(err); + setIsJoiningProject(false); + }); + }; + + return ( +
+ You are not a member of this project, but you can join this project by clicking the button + below. +
++ You{"'"}re not a member of this workspace. Please contact the workspace admin to get + an invitation or check your pending invitations. +
+