use default exports and not named exports

This commit is contained in:
Rami Bitar
2026-06-03 23:17:00 -04:00
parent a539753aa5
commit 7f86072636
21 changed files with 96 additions and 102 deletions

View File

@@ -1,49 +1,29 @@
import {
createFieldShopifyProduct,
createFieldShopifyCollection,
} from "@reacteditor/field-shopify";
import navigationEditor from "@/components/navigation/navigation.editor";
import footerEditor from "@/components/footer/footer.editor";
import { navigationEditor } from "@/components/navigation/navigation.editor";
import { footerEditor } from "@/components/footer/footer.editor";
import heroEditor from "@/components/hero/hero.editor";
import bannerEditor from "@/components/landing/banner.editor";
import { heroEditor } from "@/components/hero/hero.editor";
import { bannerEditor } from "@/components/landing/banner.editor";
import featuredProductEditor from "@/components/commerce/featured-product.editor";
import productsGridEditor from "@/components/commerce/products-grid.editor";
import productsCarouselEditor from "@/components/commerce/products-carousel.editor";
import collectionGridEditor from "@/components/commerce/collection-grid.editor";
import collectionEditor from "@/components/commerce/collection.editor";
import productDetailsEditor from "@/components/commerce/product-details.editor";
import recommendedProductsEditor from "@/components/commerce/recommended-products.editor";
import searchProductsEditor from "@/components/commerce/search-products.editor";
import { createFeaturedProductEditor } from "@/components/commerce/featured-product.editor";
import { createProductsGridEditor } from "@/components/commerce/products-grid.editor";
import { createProductsCarouselEditor } from "@/components/commerce/products-carousel.editor";
import { collectionGridEditor } from "@/components/commerce/collection-grid.editor";
import { createCollectionEditor } from "@/components/commerce/collection.editor";
import { createProductDetailsEditor } from "@/components/commerce/product-details.editor";
import { createRecommendedProductsEditor } from "@/components/commerce/recommended-products.editor";
import { searchProductsEditor } from "@/components/commerce/search-products.editor";
import { featuresEditor } from "@/components/features/features.editor";
import { testimonialsEditor } from "@/components/testimonials/testimonials.editor";
import { imageGalleryEditor } from "@/components/landing/image-gallery.editor";
import { newsletterCtaEditor } from "@/components/landing/newsletter-cta.editor";
import { logosEditor } from "@/components/logos/logos.editor";
import { ctaEditor } from "@/components/cta/cta.editor";
import { faqEditor } from "@/components/faq/faq.editor";
import featuresEditor from "@/components/features/features.editor";
import testimonialsEditor from "@/components/testimonials/testimonials.editor";
import imageGalleryEditor from "@/components/landing/image-gallery.editor";
import newsletterCtaEditor from "@/components/landing/newsletter-cta.editor";
import logosEditor from "@/components/logos/logos.editor";
import ctaEditor from "@/components/cta/cta.editor";
import faqEditor from "@/components/faq/faq.editor";
import Root from "@/config/root";
import type { UserConfig } from "@/config/types";
const SHOPIFY_DOMAIN =
process.env.NEXT_PUBLIC_SHOPIFY_DOMAIN ?? "mock.shop";
const STOREFRONT_TOKEN =
process.env.NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN ?? "";
const productField = createFieldShopifyProduct({
storeDomain: SHOPIFY_DOMAIN,
storefrontAccessToken: STOREFRONT_TOKEN || undefined,
}) as any;
const collectionField = createFieldShopifyCollection({
storeDomain: SHOPIFY_DOMAIN,
storefrontAccessToken: STOREFRONT_TOKEN || undefined,
}) as any;
const categories = {
navigation: { title: "Navigation" },
hero: { title: "Hero & Banners" },
@@ -64,9 +44,9 @@ export const homeConfig: UserConfig = {
...sharedComponents,
hero: heroEditor,
banner: bannerEditor,
"featured-product": createFeaturedProductEditor({ productField }),
"products-grid": createProductsGridEditor({ collectionField }),
"products-carousel": createProductsCarouselEditor({ collectionField }),
"featured-product": featuredProductEditor,
"products-grid": productsGridEditor,
"products-carousel": productsCarouselEditor,
"collection-grid": collectionGridEditor,
features: featuresEditor,
testimonials: testimonialsEditor,
@@ -83,9 +63,9 @@ export const productConfig: UserConfig = {
categories,
components: {
...sharedComponents,
"product-details": createProductDetailsEditor({ productField }),
"recommended-products": createRecommendedProductsEditor({ productField }),
"products-carousel": createProductsCarouselEditor({ collectionField }),
"product-details": productDetailsEditor,
"recommended-products": recommendedProductsEditor,
"products-carousel": productsCarouselEditor,
} as any,
};
@@ -94,7 +74,7 @@ export const collectionsConfig: UserConfig = {
categories,
components: {
...sharedComponents,
collection: createCollectionEditor({ collectionField }),
collection: collectionEditor,
} as any,
};