Skip to content

Commit

Permalink
fix: project authorization api fetch keys (#858)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakshesh14 authored Apr 17, 2023
1 parent 718f62a commit 7aa9e0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion apps/app/contexts/project-member.context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const ProjectMemberProvider: React.FC<Props> = (props) => {
const { workspaceSlug, projectId } = router.query;

const { data: memberDetails, error } = useSWR(
workspaceSlug && projectId ? USER_PROJECT_VIEW(workspaceSlug.toString()) : null,
workspaceSlug && projectId ? USER_PROJECT_VIEW(projectId.toString()) : null,
workspaceSlug && projectId
? () => projectService.projectMemberMe(workspaceSlug.toString(), projectId.toString())
: null,
Expand Down
21 changes: 1 addition & 20 deletions apps/app/layouts/auth-layout/project-authorization-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { PrimaryButton, Spinner } from "components/ui";
// icons
import { LayerDiagonalIcon } from "components/icons";


type Meta = {
title?: string | null;
description?: string | null;
Expand Down Expand Up @@ -61,9 +60,7 @@ const ProjectAuthorizationWrapped: React.FC<Props> = ({
const router = useRouter();
const { workspaceSlug, projectId } = router.query;

const {
issueView,
} = useIssuesView();
const { issueView } = useIssuesView();

const { loading, error, memberRole: memberType } = useProjectMyMembership();

Expand Down Expand Up @@ -97,22 +94,6 @@ const ProjectAuthorizationWrapped: React.FC<Props> = ({
</PrimaryButton>
</div>
</div>
) : error?.status === 401 || error?.status === 403 ? (
<JoinProject />
) : error?.status === 404 ? (
<div className="container h-screen grid place-items-center">
<div className="text-center space-y-4">
<p className="text-2xl font-semibold">No such project exist. Create one?</p>
<PrimaryButton
onClick={() => {
const e = new KeyboardEvent("keydown", { key: "p" });
document.dispatchEvent(e);
}}
>
Create project
</PrimaryButton>
</div>
</div>
) : settingsLayout && (memberType?.isGuest || memberType?.isViewer) ? (
<NotAuthorizedView
actionButton={
Expand Down

1 comment on commit 7aa9e0b

@vercel
Copy link

@vercel vercel bot commented on 7aa9e0b Apr 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plane-dev – ./apps/app

plane-dev-git-develop-caravel.vercel.app
plane-dev.vercel.app
plane-dev-caravel.vercel.app

Please sign in to comment.