Skip to content

Commit

Permalink
Fixed the bug with wrong project id in local storage
Browse files Browse the repository at this point in the history
  • Loading branch information
vmatsiiako committed Jan 10, 2023
1 parent e7c75b5 commit a3db20c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/components/basic/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,12 @@ export default function Layout({ children }: LayoutProps) {
.split("/")
[router.asPath.split("/").length - 1].split("?")[0];

localStorage.setItem("projectData.id", intendedWorkspaceId);
if (
!["heroku", "vercel", "github", "netlify"].includes(intendedWorkspaceId)
) {
localStorage.setItem("projectData.id", intendedWorkspaceId);
}

// If a user is not a member of a workspace they are trying to access, just push them to one of theirs
if (
!["heroku", "vercel", "github", "netlify"].includes(intendedWorkspaceId) &&
Expand Down

0 comments on commit a3db20c

Please sign in to comment.