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() ...@@ -31,7 +31,7 @@ const baseQuery = fetchBaseQuery()
31 const siteBaseQuery = async (args, api, options) => { 31 const siteBaseQuery = async (args, api, options) => {
32 const { site, url } = args 32 const { site, url } = args
33 const baseUrl = getSiteBaseUrl(site) 33 const baseUrl = getSiteBaseUrl(site)
34 return baseQuery({ ...args, url: `${baseUrl}/${url}` }, api, options) 34 return baseQuery({ ...args, url: `${baseUrl ? `${baseUrl}/` : ''}${url}` }, api, options)
35 } 35 }
36 36
37 export const sitePageSlice = createApi({ 37 export const sitePageSlice = createApi({
...@@ -83,5 +83,5 @@ export const getSiteBaseUrl = (name: string): string => { ...@@ -83,5 +83,5 @@ export const getSiteBaseUrl = (name: string): string => {
83 return configSlice.selectors.getSiteBaseUrl(store.getState(), name) 83 return configSlice.selectors.getSiteBaseUrl(store.getState(), name)
84 } 84 }
85 85
86 setSiteConfig({ name: 'msd', baseUrl: 'https://myspecialtydoc-d1d234.webflow.io' }) 86 setSiteConfig({ name: 'direct' })
87 87
......