Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production deploy #2461

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion editor.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"nanoid-good": "^3.1.0",
"natsort": "^2.0.3",
"navi": "^0.15.0",
"p-memoize": "^7.1.1",
"postcode": "^5.1.0",
"prop-types": "^15.8.1",
"ramda": "^0.28.0",
Expand Down
54 changes: 8 additions & 46 deletions editor.planx.uk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions editor.planx.uk/src/routes/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { TYPES as NodeTypes } from "@planx/components/types";
import gql from "graphql-tag";
import { hasFeatureFlag } from "lib/featureFlags";
import { NaviRequest, NotFoundError } from "navi";
import pMemoize from "p-memoize";
import { useStore } from "pages/FlowEditor/lib/store";
import { ApplicationPath } from "types";

Expand Down Expand Up @@ -69,11 +68,12 @@ const QUERY_GET_TEAM_BY_DOMAIN = gql`
query GetTeamByDomain($domain: String!) {
teams(limit: 1, where: { domain: { _eq: $domain } }) {
slug
id
}
}
`;

export const getTeamFromDomain = pMemoize(async (domain: string) => {
export const getTeamFromDomain = async (domain: string) => {
const {
data: { teams },
} = await publicClient.query({
Expand All @@ -84,7 +84,7 @@ export const getTeamFromDomain = pMemoize(async (domain: string) => {
});

return teams?.[0]?.slug;
});
};

/**
* Prevents accessing a different team than the one associated with the custom domain.
Expand Down
Loading