diff --git a/starters/shopify-algolia/app/actions/cart.actions.ts b/starters/shopify-algolia/app/actions/cart.actions.ts index 4459ef29..c0ef8f53 100644 --- a/starters/shopify-algolia/app/actions/cart.actions.ts +++ b/starters/shopify-algolia/app/actions/cart.actions.ts @@ -2,9 +2,9 @@ import { revalidateTag, unstable_cache } from "next/cache" import { cookies } from "next/headers" -import { storefrontClient } from "clients/storefrontClient" +import { storefrontClient } from "clients/storefront" import { COOKIE_CART_ID, TAGS } from "constants/index" -import { isDemoMode } from "utils/demoUtils" +import { isDemoMode } from "utils/demo-utils" export const getCart = unstable_cache(async (cartId: string) => storefrontClient.getCart(cartId), [TAGS.CART], { revalidate: 60 * 15, tags: [TAGS.CART] }) diff --git a/starters/shopify-algolia/app/actions/collection.actions.ts b/starters/shopify-algolia/app/actions/collection.actions.ts index 50a6c5a9..00308de3 100644 --- a/starters/shopify-algolia/app/actions/collection.actions.ts +++ b/starters/shopify-algolia/app/actions/collection.actions.ts @@ -2,7 +2,7 @@ import { unstable_cache } from "next/cache" import { algolia } from "clients/search" -import { getDemoSingleCategory, isDemoMode } from "utils/demoUtils" +import { getDemoSingleCategory, isDemoMode } from "utils/demo-utils" import type { PlatformCollection } from "lib/shopify/types" import { env } from "env.mjs" diff --git a/starters/shopify-algolia/app/actions/page.actions.ts b/starters/shopify-algolia/app/actions/page.actions.ts index 74d98775..0133707e 100644 --- a/starters/shopify-algolia/app/actions/page.actions.ts +++ b/starters/shopify-algolia/app/actions/page.actions.ts @@ -1,6 +1,6 @@ "use server" -import { storefrontClient } from "clients/storefrontClient" +import { storefrontClient } from "clients/storefront" import { unstable_cache } from "next/cache" export const getPage = unstable_cache(async (handle: string) => await storefrontClient.getPage(handle), ["page"], { revalidate: 3600 }) diff --git a/starters/shopify-algolia/app/actions/product.actions.ts b/starters/shopify-algolia/app/actions/product.actions.ts index 42bffde1..607c349f 100644 --- a/starters/shopify-algolia/app/actions/product.actions.ts +++ b/starters/shopify-algolia/app/actions/product.actions.ts @@ -6,7 +6,7 @@ import { env } from "env.mjs" import { algolia } from "clients/search" import type { Review } from "lib/reviews/types" -import { getDemoProductReviews, getDemoSingleProduct, isDemoMode } from "utils/demoUtils" +import { getDemoProductReviews, getDemoSingleProduct, isDemoMode } from "utils/demo-utils" import type { CommerceProduct } from "types" import { notifyOptIn } from "utils/opt-in" diff --git a/starters/shopify-algolia/app/actions/user.actions.ts b/starters/shopify-algolia/app/actions/user.actions.ts index f79d8f5f..0e46439e 100644 --- a/starters/shopify-algolia/app/actions/user.actions.ts +++ b/starters/shopify-algolia/app/actions/user.actions.ts @@ -2,7 +2,7 @@ import { PlatformUserCreateInput } from "lib/shopify/types" import { cookies } from "next/headers" -import { storefrontClient } from "clients/storefrontClient" +import { storefrontClient } from "clients/storefront" import { COOKIE_ACCESS_TOKEN } from "constants/index" export async function signupUser({ email, password }: { email: string; password: string }) { diff --git a/starters/shopify-algolia/app/api/feed/sync/route.ts b/starters/shopify-algolia/app/api/feed/sync/route.ts index 0086cb10..100437e1 100644 --- a/starters/shopify-algolia/app/api/feed/sync/route.ts +++ b/starters/shopify-algolia/app/api/feed/sync/route.ts @@ -1,6 +1,6 @@ import type { PlatformProduct } from "lib/shopify/types" import { algolia } from "clients/search" -import { storefrontClient } from "clients/storefrontClient" +import { storefrontClient } from "clients/storefront" import { env } from "env.mjs" import { compareHmac } from "utils/compare-hmac" import { enrichProduct } from "utils/enrich-product" diff --git a/starters/shopify-algolia/app/api/reviews/ai-summary/route.ts b/starters/shopify-algolia/app/api/reviews/ai-summary/route.ts index 7fc36d89..97192514 100644 --- a/starters/shopify-algolia/app/api/reviews/ai-summary/route.ts +++ b/starters/shopify-algolia/app/api/reviews/ai-summary/route.ts @@ -8,7 +8,7 @@ import { env } from "env.mjs" import { authenticate } from "utils/authenticate-api-route" import { isOptIn, notifyOptIn } from "utils/opt-in" import { unstable_noStore } from "next/cache" -import { isDemoMode } from "utils/demoUtils" +import { isDemoMode } from "utils/demo-utils" const summarySchema = z.object({ products: z.array( diff --git a/starters/shopify-algolia/app/api/reviews/sync/route.ts b/starters/shopify-algolia/app/api/reviews/sync/route.ts index 88085b5f..79ddffb0 100644 --- a/starters/shopify-algolia/app/api/reviews/sync/route.ts +++ b/starters/shopify-algolia/app/api/reviews/sync/route.ts @@ -6,7 +6,7 @@ import { authenticate } from "utils/authenticate-api-route" import { isOptIn, notifyOptIn } from "utils/opt-in" import type { Review } from "lib/reviews/types" import type { CommerceProduct } from "types" -import { isDemoMode } from "utils/demoUtils" +import { isDemoMode } from "utils/demo-utils" export const maxDuration = 60 diff --git a/starters/shopify-algolia/app/category/clp/[slug]/[page]/page.tsx b/starters/shopify-algolia/app/category/clp/[slug]/[page]/page.tsx index ba9b0dfb..df07fa7f 100644 --- a/starters/shopify-algolia/app/category/clp/[slug]/[page]/page.tsx +++ b/starters/shopify-algolia/app/category/clp/[slug]/[page]/page.tsx @@ -1,5 +1,5 @@ import type { Metadata } from "next" -import { CategoryView } from "views/Category/CategoryView" +import { CategoryView } from "views/category/category-view" export const revalidate = 86400 export const dynamic = "force-static" diff --git a/starters/shopify-algolia/app/category/clp/[slug]/page.tsx b/starters/shopify-algolia/app/category/clp/[slug]/page.tsx index b2961f13..38c18ac0 100644 --- a/starters/shopify-algolia/app/category/clp/[slug]/page.tsx +++ b/starters/shopify-algolia/app/category/clp/[slug]/page.tsx @@ -2,8 +2,8 @@ import { PlatformCollection } from "lib/shopify/types" import { algolia } from "clients/search" import { env } from "env.mjs" import type { Metadata } from "next" -import { isDemoMode } from "utils/demoUtils" -import { CategoryView } from "views/Category/CategoryView" +import { isDemoMode } from "utils/demo-utils" +import { CategoryView } from "views/category/category-view" export const revalidate = 86400 export const dynamic = "force-static" diff --git a/starters/shopify-algolia/app/category/plp/[slug]/page.tsx b/starters/shopify-algolia/app/category/plp/[slug]/page.tsx index a1ca05ef..07f6e2ee 100644 --- a/starters/shopify-algolia/app/category/plp/[slug]/page.tsx +++ b/starters/shopify-algolia/app/category/plp/[slug]/page.tsx @@ -1,6 +1,6 @@ import type { Metadata } from "next" import { SearchParamsType } from "types" -import { CategoryView } from "views/Category/CategoryView" +import { CategoryView } from "views/category/category-view" export const runtime = "nodejs" diff --git a/starters/shopify-algolia/app/error.tsx b/starters/shopify-algolia/app/error.tsx index 454e8dcf..842d344b 100644 --- a/starters/shopify-algolia/app/error.tsx +++ b/starters/shopify-algolia/app/error.tsx @@ -1,7 +1,7 @@ "use client" -import { Button } from "components/Button/Button" -import { isDemoMode } from "utils/demoUtils" +import { Button } from "components/ui/button-old" +import { isDemoMode } from "utils/demo-utils" export default function Error({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) { return ( diff --git a/starters/shopify-algolia/app/favorites/page.tsx b/starters/shopify-algolia/app/favorites/page.tsx index 432e1bce..26984cc5 100644 --- a/starters/shopify-algolia/app/favorites/page.tsx +++ b/starters/shopify-algolia/app/favorites/page.tsx @@ -1,8 +1,8 @@ import { cookies } from "next/headers" import { Suspense } from "react" import { getProduct } from "app/actions/product.actions" -import { ProductCard } from "components/ProductCard/ProductCard" -import { Skeleton } from "components/Skeleton/Skeleton" +import { ProductCard } from "components/product-card" +import { Skeleton } from "components/ui/skeleton" import { COOKIE_FAVORITES } from "constants/index" export const revalidate = 86400 diff --git a/starters/shopify-algolia/app/global-error.tsx b/starters/shopify-algolia/app/global-error.tsx index 754630ea..ff65f4a8 100644 --- a/starters/shopify-algolia/app/global-error.tsx +++ b/starters/shopify-algolia/app/global-error.tsx @@ -1,6 +1,6 @@ "use client" -import { Button } from "components/Button/Button" +import { Button } from "components/ui/button-old" export default function GlobalError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) { return ( diff --git a/starters/shopify-algolia/app/home/[bucket]/page.tsx b/starters/shopify-algolia/app/home/[bucket]/page.tsx index 9e78392c..55197a79 100644 --- a/starters/shopify-algolia/app/home/[bucket]/page.tsx +++ b/starters/shopify-algolia/app/home/[bucket]/page.tsx @@ -1,11 +1,11 @@ import { Suspense } from "react" import { BUCKETS } from "constants/index" -import { BestOffersSection } from "views/Homepage/BestOffersSection" -import { CarouselSectionSkeleton } from "views/Homepage/CarouselSection" -import { CategoriesSection, CategoriesSectionSkeleton } from "views/Homepage/CategoriesSection" -import { EverythingUnderSection } from "views/Homepage/EverythingUnderSection" -import { AnnouncementBar } from "components/AnnouncementBar/AnnouncementBar" -import { HeroSection } from "views/Homepage/HeroSection" +import { BestOffersSection } from "views/homepage/best-offers-skeleton" +import { CarouselSectionSkeleton } from "views/homepage/carousel-section" +import { CategoriesSection, CategoriesSectionSkeleton } from "views/homepage/categories-section" +import { EverythingUnderSection } from "views/homepage/everything-under-section" +import { AnnouncementBar } from "components/announcement-bar" +import { HeroSection } from "views/homepage/hero-section" export const revalidate = 86400 diff --git a/starters/shopify-algolia/app/layout.tsx b/starters/shopify-algolia/app/layout.tsx index 233d5c0a..a29d1bab 100644 --- a/starters/shopify-algolia/app/layout.tsx +++ b/starters/shopify-algolia/app/layout.tsx @@ -4,21 +4,21 @@ import nextDynamic from "next/dynamic" import Script from "next/script" import { Suspense } from "react" import { Toaster } from "sonner" -import { CallToAction } from "components/CallToAction/CallToAction" -import { Footer } from "components/Footer/Footer" -import { Modals } from "components/Modals/Modals" -import { mobileInlineScript } from "components/NavigationBar/mobileInlineScript" -import { NavigationBar } from "components/NavigationBar/NavigationBar" -import { NavItem } from "components/NavigationBar/types" -import { FlagValues } from "views/FlagValues" -import { ThirdParties } from "views/ThirdParties" +import { CallToAction } from "components/call-to-action" +import { Footer } from "components/footer" +import { Modals } from "components/modals/modals" +import { mobileInlineScript } from "components/navigation-bar/mobile-inline-script" +import { NavigationBar } from "components/navigation-bar/navigation-bar" +import type { NavItem } from "components/navigation-bar/types" +import { FlagValues } from "views/flag-values" +import { ThirdParties } from "views/third-parties" import { env } from "env.mjs" import { Metadata } from "next" -import { GithubBadge } from "views/GithubBadge" -import { DemoModeAlert } from "views/DemoModeAlert" -import { CartView } from "views/Cart/CartView" +import { GithubBadge } from "views/github-badge" +import { DemoModeAlert } from "views/demo-mode-alert" +import { CartView } from "views/cart/cart-view" -const DraftToolbar = nextDynamic(() => import("views/DraftToolbar"), { ssr: false }) +const DraftToolbar = nextDynamic(() => import("views/draft-toolbar"), { ssr: false }) export const revalidate = 86400 diff --git a/starters/shopify-algolia/app/product/[slug]/draft/page.tsx b/starters/shopify-algolia/app/product/[slug]/draft/page.tsx index 652a31c1..9be4ec57 100644 --- a/starters/shopify-algolia/app/product/[slug]/draft/page.tsx +++ b/starters/shopify-algolia/app/product/[slug]/draft/page.tsx @@ -1,22 +1,22 @@ import { unstable_cache } from "next/cache" import { draftMode } from "next/headers" import { notFound } from "next/navigation" -import { storefrontClient } from "clients/storefrontClient" +import { storefrontClient } from "clients/storefront" import type { CommerceProduct } from "types" -import { Breadcrumbs } from "components/Breadcrumbs/Breadcrumbs" +import { Breadcrumbs } from "components/breadcrumbs" import type { PlatformProduct } from "lib/shopify/types" -import { getCombination, getOptionsFromUrl, hasValidOption, removeOptionsFromUrl } from "utils/productOptionsUtils" -import { BackButton } from "views/Product/BackButton" -import { VariantsSection } from "views/Product/VariantsSection" -import { ProductTitle } from "views/Product/ProductTitle" -import { CurrencyType, mapCurrencyToSign } from "utils/mapCurrencyToSign" -import { ProductImages } from "views/Product/ProductImages" -import { RightSection } from "views/Product/RightSection" -import { AddToCartButton } from "views/Product/AddToCartButton" -import { FavoriteMarker } from "views/Product/FavoriteMarker" -import { FaqSection } from "views/Product/FaqSection" +import { getCombination, getOptionsFromUrl, hasValidOption, removeOptionsFromUrl } from "utils/product-options-utils" +import { BackButton } from "views/product/back-button" +import { VariantsSection } from "views/product/variants-section" +import { ProductTitle } from "views/product/product-title" +import { CurrencyType, mapCurrencyToSign } from "utils/map-currency-to-sign" +import { ProductImages } from "views/product/product-images" +import { RightSection } from "views/product/right-section" +import { AddToCartButton } from "views/product/add-to-cart-button" +import { FavoriteMarker } from "views/product/favorite-marker" +import { FaqSection } from "views/product/faq-section" import { slugToName } from "utils/slug-name" diff --git a/starters/shopify-algolia/app/product/[slug]/loading.tsx b/starters/shopify-algolia/app/product/[slug]/loading.tsx index 84d862d9..124e2707 100644 --- a/starters/shopify-algolia/app/product/[slug]/loading.tsx +++ b/starters/shopify-algolia/app/product/[slug]/loading.tsx @@ -1,4 +1,4 @@ -import { PageSkeleton } from "views/Product/PageSkeleton" +import { PageSkeleton } from "views/product/page-skeleton" export default function Loading() { return diff --git a/starters/shopify-algolia/app/product/[slug]/metadata.ts b/starters/shopify-algolia/app/product/[slug]/metadata.ts index bae2b72f..f76bd3b3 100644 --- a/starters/shopify-algolia/app/product/[slug]/metadata.ts +++ b/starters/shopify-algolia/app/product/[slug]/metadata.ts @@ -2,8 +2,8 @@ import { Metadata } from "next" import { Product, WithContext } from "schema-dts" import { getProduct } from "app/actions/product.actions" import { env } from "env.mjs" -import { makeKeywords } from "utils/makeKeywords" -import { removeOptionsFromUrl } from "utils/productOptionsUtils" +import { makeKeywords } from "utils/make-keywords" +import { removeOptionsFromUrl } from "utils/product-options-utils" import type { CommerceProduct } from "types" import { slugToName } from "utils/slug-name" diff --git a/starters/shopify-algolia/app/product/[slug]/opengraph-image.tsx b/starters/shopify-algolia/app/product/[slug]/opengraph-image.tsx index ae65d3f5..bb8390dc 100644 --- a/starters/shopify-algolia/app/product/[slug]/opengraph-image.tsx +++ b/starters/shopify-algolia/app/product/[slug]/opengraph-image.tsx @@ -3,7 +3,7 @@ import { ImageResponse } from "next/og" import { getProduct } from "app/actions/product.actions" -import { removeOptionsFromUrl } from "utils/productOptionsUtils" +import { removeOptionsFromUrl } from "utils/product-options-utils" import { env } from "env.mjs" export const revalidate = 86400 diff --git a/starters/shopify-algolia/app/product/[slug]/page.tsx b/starters/shopify-algolia/app/product/[slug]/page.tsx index 0c5cfc73..42db92ec 100644 --- a/starters/shopify-algolia/app/product/[slug]/page.tsx +++ b/starters/shopify-algolia/app/product/[slug]/page.tsx @@ -1,29 +1,29 @@ import { notFound } from "next/navigation" import { Suspense } from "react" import { getProduct } from "app/actions/product.actions" -import { Breadcrumbs } from "components/Breadcrumbs/Breadcrumbs" - -import { getCombination, getOptionsFromUrl, hasValidOption, removeOptionsFromUrl } from "utils/productOptionsUtils" -import { BackButton } from "views/Product/BackButton" -import { FavoriteMarker } from "views/Product/FavoriteMarker" -import { SimilarProductsSection } from "views/Product/SimilarProductsSection" -import { SimilarProductsSectionSkeleton } from "views/Product/SimilarProductsSectionSkeleton" -import { VariantsSection } from "views/Product/VariantsSection" +import { Breadcrumbs } from "components/breadcrumbs" + +import { getCombination, getOptionsFromUrl, hasValidOption, removeOptionsFromUrl } from "utils/product-options-utils" +import { BackButton } from "views/product/back-button" +import { FavoriteMarker } from "views/product/favorite-marker" +import { SimilarProductsSection } from "views/product/similar-products-section" +import { SimilarProductsSectionSkeleton } from "views/product/similar-product-section-skeleton" +import { VariantsSection } from "views/product/variants-section" import { slugToName } from "utils/slug-name" import { generateJsonLd } from "./metadata" -import { ReviewsSection } from "views/Product/ReviewsSection" +import { ReviewsSection } from "views/product/reviews-section" import type { CommerceProduct } from "types" -import { isDemoMode } from "utils/demoUtils" +import { isDemoMode } from "utils/demo-utils" import { algolia } from "clients/search" import { env } from "env.mjs" -import { ProductTitle } from "views/Product/ProductTitle" -import { CurrencyType, mapCurrencyToSign } from "utils/mapCurrencyToSign" -import { ProductImages } from "views/Product/ProductImages" -import { RightSection } from "views/Product/RightSection" -import { FaqSection } from "views/Product/FaqSection" -import { AddToCartButton } from "views/Product/AddToCartButton" +import { ProductTitle } from "views/product/product-title" +import { CurrencyType, mapCurrencyToSign } from "utils/map-currency-to-sign" +import { ProductImages } from "views/product/product-images" +import { RightSection } from "views/product/right-section" +import { FaqSection } from "views/product/faq-section" +import { AddToCartButton } from "views/product/add-to-cart-button" export const revalidate = 86400 export const dynamic = "force-static" diff --git a/starters/shopify-algolia/app/reviews/[slug]/metadata.ts b/starters/shopify-algolia/app/reviews/[slug]/metadata.ts index cac9ced9..32e635ae 100644 --- a/starters/shopify-algolia/app/reviews/[slug]/metadata.ts +++ b/starters/shopify-algolia/app/reviews/[slug]/metadata.ts @@ -1,7 +1,7 @@ import { getProduct } from "app/actions/product.actions" import { env } from "process" -import { makeKeywords } from "utils/makeKeywords" -import { removeOptionsFromUrl } from "utils/productOptionsUtils" +import { makeKeywords } from "utils/make-keywords" +import { removeOptionsFromUrl } from "utils/product-options-utils" import type { ProductReviewsPageProps } from "./page" import { Metadata } from "next" diff --git a/starters/shopify-algolia/app/reviews/[slug]/page.tsx b/starters/shopify-algolia/app/reviews/[slug]/page.tsx index 0d79c684..46d950ac 100644 --- a/starters/shopify-algolia/app/reviews/[slug]/page.tsx +++ b/starters/shopify-algolia/app/reviews/[slug]/page.tsx @@ -1,12 +1,12 @@ import { notFound, redirect } from "next/navigation" import { getProduct, getProductReviews } from "app/actions/product.actions" -import { Breadcrumbs } from "components/Breadcrumbs/Breadcrumbs" +import { Breadcrumbs } from "components/breadcrumbs" -import { BackButton } from "views/Product/BackButton" -import { StarRating } from "views/Product/StarRating" -import { PaginationSection } from "views/Listing/PaginationSection" +import { BackButton } from "views/product/back-button" +import { StarRating } from "views/product/star-rating" +import { PaginationSection } from "views/listing/pagination-section" -import { removeOptionsFromUrl } from "utils/productOptionsUtils" +import { removeOptionsFromUrl } from "utils/product-options-utils" import type { CommerceProduct } from "types" export { generateMetadata } from "./metadata" diff --git a/starters/shopify-algolia/app/search/page.tsx b/starters/shopify-algolia/app/search/page.tsx index 7084610b..7c0b1b63 100644 --- a/starters/shopify-algolia/app/search/page.tsx +++ b/starters/shopify-algolia/app/search/page.tsx @@ -1,8 +1,8 @@ import type { Metadata } from "next" import { Suspense } from "react" import type { SearchParamsType } from "types" -import { PageSkeleton } from "views/Category/PageSkeleton" -import { SearchView } from "views/Search/SearchView" +import { PageSkeleton } from "views/category/page-skeleton" +import { SearchView } from "views/search/search-view" export const metadata: Metadata = { title: "Search | Enterprise Commerce", diff --git a/starters/shopify-algolia/app/settings/page.tsx b/starters/shopify-algolia/app/settings/page.tsx index 25d2ccc8..f2335568 100644 --- a/starters/shopify-algolia/app/settings/page.tsx +++ b/starters/shopify-algolia/app/settings/page.tsx @@ -1,4 +1,4 @@ -import { SettingsView } from "views/Settings/SettingsView" +import { SettingsView } from "views/settings/settings-view" export default function Settings() { return diff --git a/starters/shopify-algolia/app/sitemap.ts b/starters/shopify-algolia/app/sitemap.ts index b77e0f69..100e3a60 100644 --- a/starters/shopify-algolia/app/sitemap.ts +++ b/starters/shopify-algolia/app/sitemap.ts @@ -1,7 +1,7 @@ import { env } from "env.mjs" import { MetadataRoute } from "next" import { algolia } from "clients/search" -import { getDemoCategories, getDemoProducts, isDemoMode } from "utils/demoUtils" +import { getDemoCategories, getDemoProducts, isDemoMode } from "utils/demo-utils" import type { PlatformCollection } from "lib/shopify/types" import type { CommerceProduct } from "types" diff --git a/starters/shopify-algolia/clients/storefrontClient.ts b/starters/shopify-algolia/clients/storefront.ts similarity index 100% rename from starters/shopify-algolia/clients/storefrontClient.ts rename to starters/shopify-algolia/clients/storefront.ts diff --git a/starters/shopify-algolia/components/AnnouncementBar/AnnouncementBar.tsx b/starters/shopify-algolia/components/announcement-bar.tsx similarity index 100% rename from starters/shopify-algolia/components/AnnouncementBar/AnnouncementBar.tsx rename to starters/shopify-algolia/components/announcement-bar.tsx diff --git a/starters/shopify-algolia/components/ProfileMenu/AuthActions.tsx b/starters/shopify-algolia/components/auth-actions.tsx similarity index 81% rename from starters/shopify-algolia/components/ProfileMenu/AuthActions.tsx rename to starters/shopify-algolia/components/auth-actions.tsx index d23a05cc..73dcf4c6 100644 --- a/starters/shopify-algolia/components/ProfileMenu/AuthActions.tsx +++ b/starters/shopify-algolia/components/auth-actions.tsx @@ -1,7 +1,7 @@ "use client" -import { Button } from "components/Button/Button" -import { useModalStore } from "stores/modalStore" +import { Button } from "components/ui/button-old" +import { useModalStore } from "stores/modal-store" export function AuthActions() { const openModal = useModalStore((s) => s.openModal) diff --git a/starters/shopify-algolia/components/Breadcrumbs/Breadcrumbs.tsx b/starters/shopify-algolia/components/breadcrumbs.tsx similarity index 94% rename from starters/shopify-algolia/components/Breadcrumbs/Breadcrumbs.tsx rename to starters/shopify-algolia/components/breadcrumbs.tsx index 551ed4c4..454f7738 100644 --- a/starters/shopify-algolia/components/Breadcrumbs/Breadcrumbs.tsx +++ b/starters/shopify-algolia/components/breadcrumbs.tsx @@ -1,4 +1,4 @@ -import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator } from "components/Breadcrumb/Breadcrumb" +import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator } from "components/ui/breadcrumb" import React from "react" import { cn } from "utils/cn" diff --git a/starters/shopify-algolia/components/CallToAction/CallToAction.tsx b/starters/shopify-algolia/components/call-to-action.tsx similarity index 87% rename from starters/shopify-algolia/components/CallToAction/CallToAction.tsx rename to starters/shopify-algolia/components/call-to-action.tsx index 2a343426..c39ac766 100644 --- a/starters/shopify-algolia/components/CallToAction/CallToAction.tsx +++ b/starters/shopify-algolia/components/call-to-action.tsx @@ -1,6 +1,6 @@ -import { Button } from "components/Button/Button" -import { Input } from "components/Input/Input" -import { Label } from "components/Label/Label" +import { Button } from "components/ui/button-old" +import { Input } from "components/ui/input" +import { Label } from "components/ui/label" export function CallToAction() { return ( diff --git a/starters/shopify-algolia/components/ExpandableContent/ExpandableContent.tsx b/starters/shopify-algolia/components/expandable-content.tsx similarity index 96% rename from starters/shopify-algolia/components/ExpandableContent/ExpandableContent.tsx rename to starters/shopify-algolia/components/expandable-content.tsx index 96e461f4..f43d66d4 100644 --- a/starters/shopify-algolia/components/ExpandableContent/ExpandableContent.tsx +++ b/starters/shopify-algolia/components/expandable-content.tsx @@ -1,6 +1,6 @@ "use client" -import { ChevronIcon } from "components/Icons/ChevronIcon" +import { ChevronIcon } from "components/icons/chevron-icon" import { type ReactNode, useEffect, useRef, useState } from "react" import { cn } from "utils/cn" diff --git a/starters/shopify-algolia/components/Footer/Footer.tsx b/starters/shopify-algolia/components/footer.tsx similarity index 100% rename from starters/shopify-algolia/components/Footer/Footer.tsx rename to starters/shopify-algolia/components/footer.tsx diff --git a/starters/shopify-algolia/components/GenericModal/GenericModal.tsx b/starters/shopify-algolia/components/generic-modal.tsx similarity index 92% rename from starters/shopify-algolia/components/GenericModal/GenericModal.tsx rename to starters/shopify-algolia/components/generic-modal.tsx index 50c69638..70924109 100644 --- a/starters/shopify-algolia/components/GenericModal/GenericModal.tsx +++ b/starters/shopify-algolia/components/generic-modal.tsx @@ -1,5 +1,5 @@ -import { Dialog, DialogClose, DialogContent, DialogHeader, DialogTitle } from "components/Dialog/Dialog" -import { CloseIcon } from "components/Icons/CloseIcon" +import { Dialog, DialogClose, DialogContent, DialogHeader, DialogTitle } from "components/ui/dialog" +import { CloseIcon } from "components/icons/close-icon" import { cn } from "utils/cn" interface FacetsModalProps { diff --git a/starters/shopify-algolia/components/Icons/ArrowIcon.tsx b/starters/shopify-algolia/components/icons/arrow-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/ArrowIcon.tsx rename to starters/shopify-algolia/components/icons/arrow-icon.tsx diff --git a/starters/shopify-algolia/components/Icons/CaretSortIcon.tsx b/starters/shopify-algolia/components/icons/caret-sort-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/CaretSortIcon.tsx rename to starters/shopify-algolia/components/icons/caret-sort-icon.tsx diff --git a/starters/shopify-algolia/components/Icons/CheckIcon.tsx b/starters/shopify-algolia/components/icons/check-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/CheckIcon.tsx rename to starters/shopify-algolia/components/icons/check-icon.tsx diff --git a/starters/shopify-algolia/components/Icons/ChevronIcon.tsx b/starters/shopify-algolia/components/icons/chevron-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/ChevronIcon.tsx rename to starters/shopify-algolia/components/icons/chevron-icon.tsx diff --git a/starters/shopify-algolia/components/Icons/CloseIcon.tsx b/starters/shopify-algolia/components/icons/close-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/CloseIcon.tsx rename to starters/shopify-algolia/components/icons/close-icon.tsx diff --git a/starters/shopify-algolia/components/Icons/FavoritesIcon.tsx b/starters/shopify-algolia/components/icons/favorites-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/FavoritesIcon.tsx rename to starters/shopify-algolia/components/icons/favorites-icon.tsx diff --git a/starters/shopify-algolia/components/Icons/FiltersIcon.tsx b/starters/shopify-algolia/components/icons/filters-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/FiltersIcon.tsx rename to starters/shopify-algolia/components/icons/filters-icon.tsx diff --git a/starters/shopify-algolia/components/Icons/HeartIcon.tsx b/starters/shopify-algolia/components/icons/heart-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/HeartIcon.tsx rename to starters/shopify-algolia/components/icons/heart-icon.tsx diff --git a/starters/shopify-algolia/components/Icons/RobotIcon.tsx b/starters/shopify-algolia/components/icons/robot-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/RobotIcon.tsx rename to starters/shopify-algolia/components/icons/robot-icon.tsx diff --git a/starters/shopify-algolia/components/Icons/SearchIcon.tsx b/starters/shopify-algolia/components/icons/search-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/SearchIcon.tsx rename to starters/shopify-algolia/components/icons/search-icon.tsx diff --git a/starters/shopify-algolia/components/Icons/StarIcon.tsx b/starters/shopify-algolia/components/icons/star-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/StarIcon.tsx rename to starters/shopify-algolia/components/icons/star-icon.tsx diff --git a/starters/shopify-algolia/components/Icons/ThinSearchIcon.tsx b/starters/shopify-algolia/components/icons/thin-search-icon.tsx similarity index 100% rename from starters/shopify-algolia/components/Icons/ThinSearchIcon.tsx rename to starters/shopify-algolia/components/icons/thin-search-icon.tsx diff --git a/starters/shopify-algolia/components/LoadingDots/LoadingDots.tsx b/starters/shopify-algolia/components/loading-dots.tsx similarity index 100% rename from starters/shopify-algolia/components/LoadingDots/LoadingDots.tsx rename to starters/shopify-algolia/components/loading-dots.tsx diff --git a/starters/shopify-algolia/components/Logo/Logo.tsx b/starters/shopify-algolia/components/logo.tsx similarity index 100% rename from starters/shopify-algolia/components/Logo/Logo.tsx rename to starters/shopify-algolia/components/logo.tsx diff --git a/starters/shopify-algolia/components/Modals/LoginModal.tsx b/starters/shopify-algolia/components/modals/login-modal.tsx similarity index 88% rename from starters/shopify-algolia/components/Modals/LoginModal.tsx rename to starters/shopify-algolia/components/modals/login-modal.tsx index e53e35bf..d7017cd1 100644 --- a/starters/shopify-algolia/components/Modals/LoginModal.tsx +++ b/starters/shopify-algolia/components/modals/login-modal.tsx @@ -3,14 +3,14 @@ import { useForm } from "react-hook-form" import { toast } from "sonner" import { z } from "zod" import { getCurrentUser, loginUser } from "app/actions/user.actions" -import { Button } from "components/Button/Button" -import { DialogFooter } from "components/Dialog/Dialog" -import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "components/Form/Form" -import { GenericModal } from "components/GenericModal/GenericModal" -import { Input } from "components/Input/Input" -import { Logo } from "components/Logo/Logo" -import { useModalStore } from "stores/modalStore" -import { useUserStore } from "stores/userStore" +import { Button } from "components/ui/button-old" +import { DialogFooter } from "components/ui/dialog" +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "components/ui/form" +import { GenericModal } from "components/generic-modal" +import { Input } from "components/ui/input" +import { Logo } from "components/logo" +import { useModalStore } from "stores/modal-store" +import { useUserStore } from "stores/user-store" const passwordRegexp = new RegExp(/(?=.*\d)(?=.*\W)(?=.*[a-z])(?=.*[A-Z]).{8,20}$/) diff --git a/starters/shopify-algolia/components/Modals/Modals.tsx b/starters/shopify-algolia/components/modals/modals.tsx similarity index 64% rename from starters/shopify-algolia/components/Modals/Modals.tsx rename to starters/shopify-algolia/components/modals/modals.tsx index 2ee7b712..1b5de009 100644 --- a/starters/shopify-algolia/components/Modals/Modals.tsx +++ b/starters/shopify-algolia/components/modals/modals.tsx @@ -2,12 +2,12 @@ import dynamic from "next/dynamic" import React from "react" -import { type Modal, useModalStore } from "stores/modalStore" -import { ReviewModal } from "./ReviewModal" +import { type Modal, useModalStore } from "stores/modal-store" +import { ReviewModal } from "./review-modal" -const LoginModal = dynamic(() => import("./LoginModal").then((m) => m.LoginModal), { loading: Placeholder }) -const SignupModal = dynamic(() => import("./SignupModal").then((m) => m.SignupModal), { loading: Placeholder }) -const SearchModal = dynamic(() => import("./SearchModal").then((m) => m.SearchModal), { loading: Placeholder }) +const LoginModal = dynamic(() => import("./login-modal").then((m) => m.LoginModal), { loading: Placeholder }) +const SignupModal = dynamic(() => import("./signup-modal").then((m) => m.SignupModal), { loading: Placeholder }) +const SearchModal = dynamic(() => import("./search-modal").then((m) => m.SearchModal), { loading: Placeholder }) export function Modals() { const modals = useModalStore((s) => s.modals) diff --git a/starters/shopify-algolia/components/Modals/ReviewModal.tsx b/starters/shopify-algolia/components/modals/review-modal.tsx similarity index 93% rename from starters/shopify-algolia/components/Modals/ReviewModal.tsx rename to starters/shopify-algolia/components/modals/review-modal.tsx index cb5cf169..e0dc2c8d 100644 --- a/starters/shopify-algolia/components/Modals/ReviewModal.tsx +++ b/starters/shopify-algolia/components/modals/review-modal.tsx @@ -6,18 +6,18 @@ import { zodResolver } from "@hookform/resolvers/zod" import { useForm } from "react-hook-form" import { toast } from "sonner" -import { useModalStore } from "stores/modalStore" - -import { Input } from "components/Input/Input" -import { Button } from "components/Button/Button" -import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "components/Form/Form" -import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "components/Dialog/Dialog" -import { Textarea } from "components/Textarea/Textarea" +import { useModalStore } from "stores/modal-store" import { cn } from "utils/cn" +import { Form } from "components/ui/form" import { submitReview } from "app/actions/reviews.actions" -import { StarIcon } from "components/Icons/StarIcon" +import { StarIcon } from "components/icons/star-icon" +import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "components/ui/dialog" +import { Button } from "components/ui/button-old" +import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "components/ui/form" +import { Textarea } from "components/ui/textarea" +import { Input } from "components/ui/input" const formSchema = z.object({ email: z.string().email({ message: "Provide email address" }).min(3).max(64), diff --git a/starters/shopify-algolia/components/Modals/SearchModal.tsx b/starters/shopify-algolia/components/modals/search-modal.tsx similarity index 91% rename from starters/shopify-algolia/components/Modals/SearchModal.tsx rename to starters/shopify-algolia/components/modals/search-modal.tsx index ee9bb9be..f82cb48f 100644 --- a/starters/shopify-algolia/components/Modals/SearchModal.tsx +++ b/starters/shopify-algolia/components/modals/search-modal.tsx @@ -3,16 +3,16 @@ import { type KeyboardEvent } from "react" import Link from "next/link" import { useRouter } from "next/navigation" -import { type Modal, useModalStore } from "stores/modalStore" +import { type Modal, useModalStore } from "stores/modal-store" -import { useAutocomplete } from "utils/useAutocomplete" -import { getHighlightedText } from "utils/highlightedText" +import { useAutocomplete } from "utils/use-autocomplete" +import { getHighlightedText } from "utils/highlighted-text" -import { Input } from "components/Input/Input" -import { Button } from "components/Button/Button" -import { Spinner } from "components/Spinner/Spinner" -import { Dialog, DialogClose, DialogContent, DialogHeader } from "components/Dialog/Dialog" -import { ProductCard } from "components/ProductCard/ProductCard" +import { Input } from "components/ui/input" +import { Button } from "components/ui/button-old" +import { Spinner } from "components/spinner" +import { Dialog, DialogClose, DialogContent, DialogHeader } from "components/ui/dialog" +import { ProductCard } from "components/product-card" export function SearchModal() { const router = useRouter() diff --git a/starters/shopify-algolia/components/Modals/SignupModal.tsx b/starters/shopify-algolia/components/modals/signup-modal.tsx similarity index 88% rename from starters/shopify-algolia/components/Modals/SignupModal.tsx rename to starters/shopify-algolia/components/modals/signup-modal.tsx index cd91858a..9fad8759 100644 --- a/starters/shopify-algolia/components/Modals/SignupModal.tsx +++ b/starters/shopify-algolia/components/modals/signup-modal.tsx @@ -3,14 +3,14 @@ import { useForm } from "react-hook-form" import { toast } from "sonner" import { z } from "zod" import { getCurrentUser, signupUser } from "app/actions/user.actions" -import { Button } from "components/Button/Button" -import { DialogFooter } from "components/Dialog/Dialog" -import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "components/Form/Form" -import { GenericModal } from "components/GenericModal/GenericModal" -import { Input } from "components/Input/Input" -import { Logo } from "components/Logo/Logo" -import { useModalStore } from "stores/modalStore" -import { useUserStore } from "stores/userStore" +import { Button } from "components/ui/button-old" +import { DialogFooter } from "components/ui/dialog" +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "components/ui/form" +import { GenericModal } from "components/generic-modal" +import { Input } from "components/ui/input" +import { Logo } from "components/logo" +import { useModalStore } from "stores/modal-store" +import { useUserStore } from "stores/user-store" const passwordRegexp = new RegExp(/(?=.*\d)(?=.*\W)(?=.*[a-z])(?=.*[A-Z]).{8,20}$/) diff --git a/starters/shopify-algolia/components/NavigationBar/Autocomplete.tsx b/starters/shopify-algolia/components/navigation-bar/autocomplete.tsx similarity index 91% rename from starters/shopify-algolia/components/NavigationBar/Autocomplete.tsx rename to starters/shopify-algolia/components/navigation-bar/autocomplete.tsx index acb49b04..b1388e16 100644 --- a/starters/shopify-algolia/components/NavigationBar/Autocomplete.tsx +++ b/starters/shopify-algolia/components/navigation-bar/autocomplete.tsx @@ -9,11 +9,11 @@ import { useRouter } from "next/navigation" import { useClickAway } from "@uidotdev/usehooks" import { cn } from "utils/cn" -import { getHighlightedText } from "utils/highlightedText" -import { useAutocomplete } from "utils/useAutocomplete" +import { getHighlightedText } from "utils/highlighted-text" +import { useAutocomplete } from "utils/use-autocomplete" -import { SearchIcon } from "components/Icons/SearchIcon" -import { Spinner } from "components/Spinner/Spinner" +import { SearchIcon } from "components/icons/search-icon" +import { Spinner } from "components/spinner" interface AutocompleteProps { className?: string diff --git a/starters/shopify-algolia/components/NavigationBar/Cart.tsx b/starters/shopify-algolia/components/navigation-bar/cart.tsx similarity index 92% rename from starters/shopify-algolia/components/NavigationBar/Cart.tsx rename to starters/shopify-algolia/components/navigation-bar/cart.tsx index 565cad06..10b0353b 100644 --- a/starters/shopify-algolia/components/NavigationBar/Cart.tsx +++ b/starters/shopify-algolia/components/navigation-bar/cart.tsx @@ -1,8 +1,8 @@ "use client" import { cn } from "utils/cn" -import { OpenCartButton } from "./OpenCartButton" -import { useCartStore } from "stores/cartStore" +import { OpenCartButton } from "./open-cart-button" +import { useCartStore } from "stores/cart-store" interface CartProps { className?: string diff --git a/starters/shopify-algolia/components/NavigationBar/Favorites.tsx b/starters/shopify-algolia/components/navigation-bar/favorites.tsx similarity index 88% rename from starters/shopify-algolia/components/NavigationBar/Favorites.tsx rename to starters/shopify-algolia/components/navigation-bar/favorites.tsx index 18ddc3a2..f30b3642 100644 --- a/starters/shopify-algolia/components/NavigationBar/Favorites.tsx +++ b/starters/shopify-algolia/components/navigation-bar/favorites.tsx @@ -1,5 +1,5 @@ import Link from "next/link" -import { FavoritesIcon } from "components/Icons/FavoritesIcon" +import { FavoritesIcon } from "components/icons/favorites-icon" import { cn } from "utils/cn" interface FavoritesProps { diff --git a/starters/shopify-algolia/components/NavigationBar/mobileInlineScript.ts b/starters/shopify-algolia/components/navigation-bar/mobile-inline-script.ts similarity index 100% rename from starters/shopify-algolia/components/NavigationBar/mobileInlineScript.ts rename to starters/shopify-algolia/components/navigation-bar/mobile-inline-script.ts diff --git a/starters/shopify-algolia/components/NavigationBar/NavigationBar.tsx b/starters/shopify-algolia/components/navigation-bar/navigation-bar.tsx similarity index 85% rename from starters/shopify-algolia/components/NavigationBar/NavigationBar.tsx rename to starters/shopify-algolia/components/navigation-bar/navigation-bar.tsx index 064c360a..566c25c7 100644 --- a/starters/shopify-algolia/components/NavigationBar/NavigationBar.tsx +++ b/starters/shopify-algolia/components/navigation-bar/navigation-bar.tsx @@ -1,22 +1,22 @@ import { Suspense } from "react" -import { ChevronIcon } from "components/Icons/ChevronIcon" +import { ChevronIcon } from "components/icons/chevron-icon" import dynamic from "next/dynamic" -import Link from "next/link" import { cn } from "utils/cn" -import { Autocomplete } from "./Autocomplete" -import { Cart } from "./Cart" -import { Favorites } from "./Favorites" +import { Autocomplete } from "./autocomplete" +import { Cart } from "./cart" +import { Favorites } from "./favorites" import { ImageGridItem, NavItem, TextGridItem, TextImageGridItem } from "./types" -import { ImageGridVariant } from "./variants/ImageGridVariant" -import { TextGridVariant } from "./variants/TextGridVariant" -import { TextImageGridVariant } from "./variants/TextImageGridVariant" -import { Skeleton } from "components/Skeleton/Skeleton" -import { CloseIcon } from "components/Icons/CloseIcon" -import { SearchButton } from "./SearchButton" -import { NavigationItem } from "./NavigationItem" +import { ImageGridVariant } from "./variants/image-grid" +import { TextGridVariant } from "./variants/text-grid" +import { TextImageGridVariant } from "./variants/text-image-grid" +import { Skeleton } from "components/ui/skeleton" +import { CloseIcon } from "components/icons/close-icon" +import { SearchButton } from "./search-button" +import { NavigationItem } from "./navigation-item" +import Link from "next/link" -const ProductAddedAlert = dynamic(() => import("views/Product/ProductAddedAlert").then((mod) => mod.ProductAddedAlert)) +const ProductAddedAlert = dynamic(() => import("views/product/product-added-alert").then((mod) => mod.ProductAddedAlert)) interface NavigationBarProps { items: NavItem[] diff --git a/starters/shopify-algolia/components/NavigationBar/NavigationItem.tsx b/starters/shopify-algolia/components/navigation-bar/navigation-item.tsx similarity index 91% rename from starters/shopify-algolia/components/NavigationBar/NavigationItem.tsx rename to starters/shopify-algolia/components/navigation-bar/navigation-item.tsx index 4ea0bb4f..3c24086c 100644 --- a/starters/shopify-algolia/components/NavigationBar/NavigationItem.tsx +++ b/starters/shopify-algolia/components/navigation-bar/navigation-item.tsx @@ -1,7 +1,7 @@ "use client" import type { MouseEvent } from "react" -import { ChevronIcon } from "components/Icons/ChevronIcon" +import { ChevronIcon } from "components/icons/chevron-icon" import { NavItem } from "./types" export function NavigationItem({ singleMenuItem }: { singleMenuItem: NavItem }) { diff --git a/starters/shopify-algolia/components/NavigationBar/OpenCartButton.tsx b/starters/shopify-algolia/components/navigation-bar/open-cart-button.tsx similarity index 84% rename from starters/shopify-algolia/components/NavigationBar/OpenCartButton.tsx rename to starters/shopify-algolia/components/navigation-bar/open-cart-button.tsx index 3862c37f..e43e145d 100644 --- a/starters/shopify-algolia/components/NavigationBar/OpenCartButton.tsx +++ b/starters/shopify-algolia/components/navigation-bar/open-cart-button.tsx @@ -1,6 +1,6 @@ "use client" -import { useCartStore } from "stores/cartStore" +import { useCartStore } from "stores/cart-store" export function OpenCartButton() { const openCart = useCartStore((s) => s.openCart) diff --git a/starters/shopify-algolia/components/NavigationBar/SearchButton.tsx b/starters/shopify-algolia/components/navigation-bar/search-button.tsx similarity index 66% rename from starters/shopify-algolia/components/NavigationBar/SearchButton.tsx rename to starters/shopify-algolia/components/navigation-bar/search-button.tsx index 762de45e..04d910ef 100644 --- a/starters/shopify-algolia/components/NavigationBar/SearchButton.tsx +++ b/starters/shopify-algolia/components/navigation-bar/search-button.tsx @@ -1,9 +1,9 @@ "use client" -import { useModalStore } from "stores/modalStore" +import { useModalStore } from "stores/modal-store" -import { ThinSearchIcon } from "components/Icons/ThinSearchIcon" -import { Button } from "components/Button/Button" +import { ThinSearchIcon } from "components/icons/thin-search-icon" +import { Button } from "components/ui/button-old" export function SearchButton() { const openModal = useModalStore((s) => s.openModal) diff --git a/starters/shopify-algolia/components/NavigationBar/types.ts b/starters/shopify-algolia/components/navigation-bar/types.ts similarity index 100% rename from starters/shopify-algolia/components/NavigationBar/types.ts rename to starters/shopify-algolia/components/navigation-bar/types.ts diff --git a/starters/shopify-algolia/components/NavigationBar/variants/ImageGridVariant.tsx b/starters/shopify-algolia/components/navigation-bar/variants/image-grid.tsx similarity index 100% rename from starters/shopify-algolia/components/NavigationBar/variants/ImageGridVariant.tsx rename to starters/shopify-algolia/components/navigation-bar/variants/image-grid.tsx diff --git a/starters/shopify-algolia/components/NavigationBar/variants/TextGridVariant.tsx b/starters/shopify-algolia/components/navigation-bar/variants/text-grid.tsx similarity index 100% rename from starters/shopify-algolia/components/NavigationBar/variants/TextGridVariant.tsx rename to starters/shopify-algolia/components/navigation-bar/variants/text-grid.tsx diff --git a/starters/shopify-algolia/components/NavigationBar/variants/TextImageGridVariant.tsx b/starters/shopify-algolia/components/navigation-bar/variants/text-image-grid.tsx similarity index 100% rename from starters/shopify-algolia/components/NavigationBar/variants/TextImageGridVariant.tsx rename to starters/shopify-algolia/components/navigation-bar/variants/text-image-grid.tsx diff --git a/starters/shopify-algolia/components/Icons/Icons.stories.tsx b/starters/shopify-algolia/components/old-icons.stories.tsx similarity index 54% rename from starters/shopify-algolia/components/Icons/Icons.stories.tsx rename to starters/shopify-algolia/components/old-icons.stories.tsx index 1ebd0114..2a6f361d 100644 --- a/starters/shopify-algolia/components/Icons/Icons.stories.tsx +++ b/starters/shopify-algolia/components/old-icons.stories.tsx @@ -1,13 +1,13 @@ import type { Meta } from "@storybook/react" -import { ArrowIcon } from "./ArrowIcon" -import { CaretSortIcon } from "./CaretSortIcon" -import { CheckIcon } from "./CheckIcon" -import { ChevronIcon } from "./ChevronIcon" -import { CloseIcon } from "./CloseIcon" -import { FavoritesIcon } from "./FavoritesIcon" -import { FiltersIcon } from "./FiltersIcon" -import { HeartIcon } from "./HeartIcon" -import { SearchIcon } from "./SearchIcon" +import { ArrowIcon } from "./icons/arrow-icon" +import { CaretSortIcon } from "./icons/caret-sort-icon" +import { CheckIcon } from "./icons/check-icon" +import { ChevronIcon } from "./icons/chevron-icon" +import { CloseIcon } from "./icons/close-icon" +import { FavoritesIcon } from "./icons/favorites-icon" +import { FiltersIcon } from "./icons/filters-icon" +import { HeartIcon } from "./icons/heart-icon" +import { SearchIcon } from "./icons/search-icon" const meta: Meta = { title: "Icons", diff --git a/starters/shopify-algolia/components/ProductCard/ProductCard.tsx b/starters/shopify-algolia/components/product-card.tsx similarity index 94% rename from starters/shopify-algolia/components/ProductCard/ProductCard.tsx rename to starters/shopify-algolia/components/product-card.tsx index 8282e932..66357aae 100644 --- a/starters/shopify-algolia/components/ProductCard/ProductCard.tsx +++ b/starters/shopify-algolia/components/product-card.tsx @@ -1,9 +1,9 @@ import Image from "next/image" import Link from "next/link" import { cn } from "utils/cn" -import { type CurrencyType, mapCurrencyToSign } from "utils/mapCurrencyToSign" +import { type CurrencyType, mapCurrencyToSign } from "utils/map-currency-to-sign" import type { CommerceProduct } from "types" -import { StarIcon } from "components/Icons/StarIcon" +import { StarIcon } from "components/icons/star-icon" interface ProductCardProps extends Pick { priority?: boolean diff --git a/starters/shopify-algolia/components/ProfileMenu/ProfileBar.tsx b/starters/shopify-algolia/components/profile-bar.tsx similarity index 91% rename from starters/shopify-algolia/components/ProfileMenu/ProfileBar.tsx rename to starters/shopify-algolia/components/profile-bar.tsx index 470eff69..ba941754 100644 --- a/starters/shopify-algolia/components/ProfileMenu/ProfileBar.tsx +++ b/starters/shopify-algolia/components/profile-bar.tsx @@ -4,8 +4,8 @@ import { PlatformUser } from "lib/shopify/types" import Link from "next/link" import { useRouter } from "next/navigation" import { logoutUser } from "app/actions/user.actions" -import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "components/DropdownMenu/DropdownMenu" -import { useUserStore } from "stores/userStore" +import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "components/ui/dropdown-menu" +import { useUserStore } from "stores/user-store" export default function ProfileBar({ user }: { user: PlatformUser }) { const router = useRouter() diff --git a/starters/shopify-algolia/components/ProfileMenu/ProfileMenu.tsx b/starters/shopify-algolia/components/profile-menu.tsx similarity index 74% rename from starters/shopify-algolia/components/ProfileMenu/ProfileMenu.tsx rename to starters/shopify-algolia/components/profile-menu.tsx index bfe10b54..a2bc3ab0 100644 --- a/starters/shopify-algolia/components/ProfileMenu/ProfileMenu.tsx +++ b/starters/shopify-algolia/components/profile-menu.tsx @@ -1,13 +1,13 @@ "use client" import dynamic from "next/dynamic" -import { Skeleton } from "components/Skeleton/Skeleton" -import { AuthActions } from "components/ProfileMenu/AuthActions" -import { useUserStore } from "stores/userStore" +import { Skeleton } from "components/ui/skeleton" +import { AuthActions } from "components/auth-actions" +import { useUserStore } from "stores/user-store" import { useEffect, useTransition } from "react" import { getCurrentUser } from "app/actions/user.actions" -const ProfileBar = dynamic(() => import("./ProfileBar"), { ssr: false, loading: ActionsSkeleton }) +const ProfileBar = dynamic(() => import("./profile-bar"), { ssr: false, loading: ActionsSkeleton }) export function ProfileMenu() { const { user, setUser } = useUserStore() diff --git a/starters/shopify-algolia/components/ProductCard/QuickAddButton.tsx b/starters/shopify-algolia/components/quick-add-button.tsx similarity index 89% rename from starters/shopify-algolia/components/ProductCard/QuickAddButton.tsx rename to starters/shopify-algolia/components/quick-add-button.tsx index 3ca1ab87..f8969958 100644 --- a/starters/shopify-algolia/components/ProductCard/QuickAddButton.tsx +++ b/starters/shopify-algolia/components/quick-add-button.tsx @@ -2,12 +2,12 @@ import { useState } from "react" import { addCartItem } from "app/actions/cart.actions" -import { Spinner } from "components/Spinner/Spinner" -import { useAddProductStore } from "stores/addProductStore" +import { Spinner } from "components/spinner" +import { useAddProductStore } from "stores/add-product-store" import { cn } from "utils/cn" -import { Combination } from "utils/productOptionsUtils" +import { Combination } from "utils/product-options-utils" import { toast } from "sonner" -import { type CurrencyType, mapCurrencyToSign } from "utils/mapCurrencyToSign" +import { type CurrencyType, mapCurrencyToSign } from "utils/map-currency-to-sign" import type { CommerceProduct } from "types" interface QuickAddButtonProps { diff --git a/starters/shopify-algolia/components/ProductCard/QuickAdd.tsx b/starters/shopify-algolia/components/quick-add.tsx similarity index 91% rename from starters/shopify-algolia/components/ProductCard/QuickAdd.tsx rename to starters/shopify-algolia/components/quick-add.tsx index 6423b047..9ba5ccb7 100644 --- a/starters/shopify-algolia/components/ProductCard/QuickAdd.tsx +++ b/starters/shopify-algolia/components/quick-add.tsx @@ -1,6 +1,6 @@ import type { PlatformVariant } from "lib/shopify/types" -import { getAllCombinations } from "utils/productOptionsUtils" -import QuickAddButton from "./QuickAddButton" +import { getAllCombinations } from "utils/product-options-utils" +import QuickAddButton from "./quick-add-button" import { CommerceProduct } from "types" interface QuickAddProps { diff --git a/starters/shopify-algolia/components/Spinner/Spinner.tsx b/starters/shopify-algolia/components/spinner.tsx similarity index 100% rename from starters/shopify-algolia/components/Spinner/Spinner.tsx rename to starters/shopify-algolia/components/spinner.tsx diff --git a/starters/shopify-algolia/components/Accordion/Accordion.tsx b/starters/shopify-algolia/components/ui/accordion.tsx similarity index 97% rename from starters/shopify-algolia/components/Accordion/Accordion.tsx rename to starters/shopify-algolia/components/ui/accordion.tsx index 43021f69..10bd6de7 100644 --- a/starters/shopify-algolia/components/Accordion/Accordion.tsx +++ b/starters/shopify-algolia/components/ui/accordion.tsx @@ -3,7 +3,7 @@ import * as AccordionPrimitive from "@radix-ui/react-accordion" import * as React from "react" import { cn } from "utils/cn" -import { ChevronIcon } from "../Icons/ChevronIcon" +import { ChevronIcon } from "../icons/chevron-icon" const Accordion = AccordionPrimitive.Root diff --git a/starters/shopify-algolia/components/Alert/Alert.tsx b/starters/shopify-algolia/components/ui/alert.tsx similarity index 100% rename from starters/shopify-algolia/components/Alert/Alert.tsx rename to starters/shopify-algolia/components/ui/alert.tsx diff --git a/starters/shopify-algolia/components/Badge/Badge.tsx b/starters/shopify-algolia/components/ui/badge.tsx similarity index 100% rename from starters/shopify-algolia/components/Badge/Badge.tsx rename to starters/shopify-algolia/components/ui/badge.tsx diff --git a/starters/shopify-algolia/components/Breadcrumb/Breadcrumb.tsx b/starters/shopify-algolia/components/ui/breadcrumb.tsx similarity index 97% rename from starters/shopify-algolia/components/Breadcrumb/Breadcrumb.tsx rename to starters/shopify-algolia/components/ui/breadcrumb.tsx index 65dd6d33..4dc33767 100644 --- a/starters/shopify-algolia/components/Breadcrumb/Breadcrumb.tsx +++ b/starters/shopify-algolia/components/ui/breadcrumb.tsx @@ -1,7 +1,7 @@ import * as React from "react" import { Slot } from "@radix-ui/react-slot" import { cn } from "utils/cn" -import { ChevronIcon } from "components/Icons/ChevronIcon" +import { ChevronIcon } from "components/icons/chevron-icon" import Link, { type LinkProps } from "next/link" const Breadcrumb = React.forwardRef< diff --git a/starters/shopify-algolia/components/Button/Button.tsx b/starters/shopify-algolia/components/ui/button-old.tsx similarity index 100% rename from starters/shopify-algolia/components/Button/Button.tsx rename to starters/shopify-algolia/components/ui/button-old.tsx diff --git a/starters/shopify-algolia/components/Button/ButtonNew.tsx b/starters/shopify-algolia/components/ui/button.tsx similarity index 100% rename from starters/shopify-algolia/components/Button/ButtonNew.tsx rename to starters/shopify-algolia/components/ui/button.tsx diff --git a/starters/shopify-algolia/components/Card/Card.tsx b/starters/shopify-algolia/components/ui/card.tsx similarity index 100% rename from starters/shopify-algolia/components/Card/Card.tsx rename to starters/shopify-algolia/components/ui/card.tsx diff --git a/starters/shopify-algolia/components/Carousel/Carousel.tsx b/starters/shopify-algolia/components/ui/carousel.tsx similarity index 98% rename from starters/shopify-algolia/components/Carousel/Carousel.tsx rename to starters/shopify-algolia/components/ui/carousel.tsx index b88b5298..e568fdea 100644 --- a/starters/shopify-algolia/components/Carousel/Carousel.tsx +++ b/starters/shopify-algolia/components/ui/carousel.tsx @@ -4,8 +4,8 @@ import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-reac import { createContext, forwardRef, useCallback, useContext, useEffect, useState } from "react" import { cn } from "utils/cn" -import { Button } from "../Button/Button" -import { ChevronIcon } from "../Icons/ChevronIcon" +import { Button } from "./button-old" +import { ChevronIcon } from "../icons/chevron-icon" type CarouselApi = UseEmblaCarouselType[1] type UseCarouselParameters = Parameters diff --git a/starters/shopify-algolia/components/Checkbox/Checkbox.tsx b/starters/shopify-algolia/components/ui/checkbox.tsx similarity index 95% rename from starters/shopify-algolia/components/Checkbox/Checkbox.tsx rename to starters/shopify-algolia/components/ui/checkbox.tsx index cd582bd5..5c692dc5 100644 --- a/starters/shopify-algolia/components/Checkbox/Checkbox.tsx +++ b/starters/shopify-algolia/components/ui/checkbox.tsx @@ -3,7 +3,7 @@ import * as CheckboxPrimitive from "@radix-ui/react-checkbox" import * as React from "react" import { cn } from "utils/cn" -import { CheckIcon } from "../Icons/CheckIcon" +import { CheckIcon } from "../icons/check-icon" const Checkbox = React.forwardRef, React.ComponentPropsWithoutRef>( ({ className, ...props }, ref) => ( diff --git a/starters/shopify-algolia/components/Dialog/Dialog.tsx b/starters/shopify-algolia/components/ui/dialog.tsx similarity index 100% rename from starters/shopify-algolia/components/Dialog/Dialog.tsx rename to starters/shopify-algolia/components/ui/dialog.tsx diff --git a/starters/shopify-algolia/components/DropdownMenu/DropdownMenu.tsx b/starters/shopify-algolia/components/ui/dropdown-menu.tsx similarity index 100% rename from starters/shopify-algolia/components/DropdownMenu/DropdownMenu.tsx rename to starters/shopify-algolia/components/ui/dropdown-menu.tsx diff --git a/starters/shopify-algolia/components/Form/Form.tsx b/starters/shopify-algolia/components/ui/form.tsx similarity index 98% rename from starters/shopify-algolia/components/Form/Form.tsx rename to starters/shopify-algolia/components/ui/form.tsx index 300536d8..0c8fd818 100644 --- a/starters/shopify-algolia/components/Form/Form.tsx +++ b/starters/shopify-algolia/components/ui/form.tsx @@ -1,8 +1,10 @@ +"use client" + import * as LabelPrimitive from "@radix-ui/react-label" import { Slot } from "@radix-ui/react-slot" import * as React from "react" import { Controller, ControllerProps, FieldPath, FieldValues, FormProvider, useFormContext } from "react-hook-form" -import { Label } from "components/Label/Label" +import { Label } from "components/ui/label" import { cn } from "utils/cn" const Form = FormProvider diff --git a/starters/shopify-algolia/components/Input/Input.tsx b/starters/shopify-algolia/components/ui/input.tsx similarity index 100% rename from starters/shopify-algolia/components/Input/Input.tsx rename to starters/shopify-algolia/components/ui/input.tsx diff --git a/starters/shopify-algolia/components/Label/Label.tsx b/starters/shopify-algolia/components/ui/label.tsx similarity index 100% rename from starters/shopify-algolia/components/Label/Label.tsx rename to starters/shopify-algolia/components/ui/label.tsx diff --git a/starters/shopify-algolia/components/Pagination/Pagination.tsx b/starters/shopify-algolia/components/ui/pagination.tsx similarity index 96% rename from starters/shopify-algolia/components/Pagination/Pagination.tsx rename to starters/shopify-algolia/components/ui/pagination.tsx index 9ec50e3c..9d3ff376 100644 --- a/starters/shopify-algolia/components/Pagination/Pagination.tsx +++ b/starters/shopify-algolia/components/ui/pagination.tsx @@ -2,8 +2,8 @@ import Link, { LinkProps } from "next/link" import * as React from "react" import { cn } from "utils/cn" -import { ButtonProps, buttonVariants } from "../Button/Button" -import { ChevronIcon } from "../Icons/ChevronIcon" +import { ButtonProps, buttonVariants } from "./button-old" +import { ChevronIcon } from "../icons/chevron-icon" const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (