diff --git a/api.planx.uk/modules/send/email/service.ts b/api.planx.uk/modules/send/email/service.ts index f8b9fff2cf..7148d4cfb3 100644 --- a/api.planx.uk/modules/send/email/service.ts +++ b/api.planx.uk/modules/send/email/service.ts @@ -12,7 +12,9 @@ interface GetTeamEmailSettings { }[]; } -export const TEAM_EMAIL_SETTINGS_QUERY = ` +export async function getTeamEmailSettings(localAuthority: string) { + const response = await $api.client.request( + gql` query GetTeamEmailSettings($slug: String) { teams(where: { slug: { _eq: $slug } }) { teamSettings: team_settings { @@ -24,12 +26,6 @@ export const TEAM_EMAIL_SETTINGS_QUERY = ` } } } - `; - -export async function getTeamEmailSettings(localAuthority: string) { - const response = await $api.client.request( - gql` - ${TEAM_EMAIL_SETTINGS_QUERY} `, { slug: localAuthority, diff --git a/editor.planx.uk/src/index.tsx b/editor.planx.uk/src/index.tsx index cf293039eb..1d3a6dae2a 100644 --- a/editor.planx.uk/src/index.tsx +++ b/editor.planx.uk/src/index.tsx @@ -18,6 +18,7 @@ import HelmetProvider from "react-navi-helmet-async"; import { ToastContainer } from "react-toastify"; // init airbrake before everything else +import * as airbrake from "./airbrake"; import { client } from "./lib/graphql"; import navigation from "./lib/navigation"; import { defaultTheme } from "./theme"; @@ -49,7 +50,7 @@ const hasJWT = (): boolean | void => { // If JWT not set via cookie, check search params const jwtSearchParams = new URLSearchParams(window.location.search).get( - "jwt" + "jwt", ); if (!jwtSearchParams) return false;