a08f00fa by Adam Heath

Handle the case of baseUrl not being set for a site, and remove the msd

config, replacing it with 'direct'.
1 parent 3497e932
......@@ -31,7 +31,7 @@ const baseQuery = fetchBaseQuery()
const siteBaseQuery = async (args, api, options) => {
const { site, url } = args
const baseUrl = getSiteBaseUrl(site)
return baseQuery({ ...args, url: `${baseUrl}/${url}` }, api, options)
return baseQuery({ ...args, url: `${baseUrl ? `${baseUrl}/` : ''}${url}` }, api, options)
}
export const sitePageSlice = createApi({
......@@ -83,5 +83,5 @@ export const getSiteBaseUrl = (name: string): string => {
return configSlice.selectors.getSiteBaseUrl(store.getState(), name)
}
setSiteConfig({ name: 'msd', baseUrl: 'https://myspecialtydoc-d1d234.webflow.io' })
setSiteConfig({ name: 'direct' })
......