diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/layout.tsx index 9efaac746..13c4f2465 100644 --- a/src/app/(main)/layout.tsx +++ b/src/app/(main)/layout.tsx @@ -6,12 +6,10 @@ import SkipToMain from "src/components/skipToMain/SkipToMain"; import { getDraftModeInfo } from "src/utils/draftmode"; import { BrandAssets } from "studio/lib/interfaces/brandAssets"; import { CompanyInfo } from "studio/lib/interfaces/companyDetails"; -import { LegalDocument } from "studio/lib/interfaces/legalDocuments"; import { Navigation } from "studio/lib/interfaces/navigation"; import { SocialMediaProfiles } from "studio/lib/interfaces/socialMedia"; import { BRAND_ASSETS_QUERY } from "studio/lib/queries/brandAssets"; import { COMPANY_INFO_QUERY } from "studio/lib/queries/companyDetails"; -import { LEGAL_DOCUMENTS_BY_LANG_QUERY } from "studio/lib/queries/legalDocuments"; import { NAV_QUERY } from "studio/lib/queries/navigation"; import { SOMEPROFILES_QUERY } from "studio/lib/queries/socialMediaProfiles"; import { loadStudioQuery } from "studio/lib/store"; @@ -27,27 +25,17 @@ export default async function Layout({ }>) { const { perspective, isDraftMode } = getDraftModeInfo(); - const [ - initialNav, - initialCompanyInfo, - initialSoMe, - initialLegal, - initialBrandAssets, - ] = await Promise.all([ - loadStudioQuery(NAV_QUERY, {}, { perspective }), - loadStudioQuery(COMPANY_INFO_QUERY, {}, { perspective }), - loadStudioQuery( - SOMEPROFILES_QUERY, - {}, - { perspective }, - ), - loadStudioQuery( - LEGAL_DOCUMENTS_BY_LANG_QUERY, - { language: "en" }, //TODO: replace this with selected language for the page - { perspective }, - ), - loadStudioQuery(BRAND_ASSETS_QUERY, {}, { perspective }), - ]); + const [initialNav, initialCompanyInfo, initialSoMe, initialBrandAssets] = + await Promise.all([ + loadStudioQuery(NAV_QUERY, {}, { perspective }), + loadStudioQuery(COMPANY_INFO_QUERY, {}, { perspective }), + loadStudioQuery( + SOMEPROFILES_QUERY, + {}, + { perspective }, + ), + loadStudioQuery(BRAND_ASSETS_QUERY, {}, { perspective }), + ]); const hasNavData = hasValidData(initialNav.data); const hasCompanyInfoData = hasValidData(initialCompanyInfo.data); @@ -90,7 +78,6 @@ export default async function Layout({ ) : (