diff --git a/wp-content/themes/ccat/app/composables/useSection.ts b/wp-content/themes/ccat/app/composables/useSection.ts deleted file mode 100644 index cbe3f1a..0000000 --- a/wp-content/themes/ccat/app/composables/useSection.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { TheSectionFragment } from "#graphql-operations"; -import { SectionTextBlock } from "#components"; - -const sections = { - GroupAbstractBuilderSectionsTextBlockLayout: SectionTextBlock, -} as const; - -export function useSection({ fieldGroupName, ...attrs }: TheSectionFragment) { - const component = sections[fieldGroupName as keyof typeof sections]; - if (!component) throw createError({ statusCode: 500, statusMessage: "Erreur interne", message: "Type de section invalide." }); - return { component, attrs }; -} diff --git a/wp-content/themes/ccat/server/utils/useSection.ts b/wp-content/themes/ccat/shared/utils/useSection.ts similarity index 100% rename from wp-content/themes/ccat/server/utils/useSection.ts rename to wp-content/themes/ccat/shared/utils/useSection.ts