diff --git a/starters/shopify-algolia/views/Product/RightSection.tsx b/starters/shopify-algolia/views/product/right-section.tsx
similarity index 100%
rename from starters/shopify-algolia/views/Product/RightSection.tsx
rename to starters/shopify-algolia/views/product/right-section.tsx
diff --git a/starters/shopify-algolia/views/Product/SideImages.tsx b/starters/shopify-algolia/views/product/side-images.tsx
similarity index 98%
rename from starters/shopify-algolia/views/Product/SideImages.tsx
rename to starters/shopify-algolia/views/product/side-images.tsx
index c18ba269..94912e3d 100644
--- a/starters/shopify-algolia/views/Product/SideImages.tsx
+++ b/starters/shopify-algolia/views/product/side-images.tsx
@@ -1,6 +1,6 @@
import Image from "next/image"
import { type Dispatch, type SetStateAction, useCallback } from "react"
-import { Carousel, type CarouselApi, CarouselContent } from "components/Carousel/Carousel"
+import { Carousel, type CarouselApi, CarouselContent } from "components/ui/carousel"
import { cn } from "utils/cn"
import type { CommerceProduct } from "types"
diff --git a/starters/shopify-algolia/views/Product/SimilarProductsSectionSkeleton.tsx b/starters/shopify-algolia/views/product/similar-product-section-skeleton.tsx
similarity index 92%
rename from starters/shopify-algolia/views/Product/SimilarProductsSectionSkeleton.tsx
rename to starters/shopify-algolia/views/product/similar-product-section-skeleton.tsx
index 50edb0fe..a6cdddd9 100644
--- a/starters/shopify-algolia/views/Product/SimilarProductsSectionSkeleton.tsx
+++ b/starters/shopify-algolia/views/product/similar-product-section-skeleton.tsx
@@ -1,4 +1,4 @@
-import { Skeleton } from "components/Skeleton/Skeleton"
+import { Skeleton } from "components/ui/skeleton"
export function SimilarProductsSectionSkeleton() {
return (
diff --git a/starters/shopify-algolia/views/Product/SimilarProductsSection.tsx b/starters/shopify-algolia/views/product/similar-products-section.tsx
similarity index 92%
rename from starters/shopify-algolia/views/Product/SimilarProductsSection.tsx
rename to starters/shopify-algolia/views/product/similar-products-section.tsx
index 8c906848..06e904be 100644
--- a/starters/shopify-algolia/views/Product/SimilarProductsSection.tsx
+++ b/starters/shopify-algolia/views/product/similar-products-section.tsx
@@ -1,8 +1,8 @@
import { algolia } from "clients/search"
-import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "components/Carousel/Carousel"
-import { ProductCard } from "components/ProductCard/ProductCard"
+import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "components/ui/carousel"
+import { ProductCard } from "components/product-card"
import { unstable_cache } from "next/cache"
-import { getDemoProducts, isDemoMode } from "utils/demoUtils"
+import { getDemoProducts, isDemoMode } from "utils/demo-utils"
import type { CommerceProduct } from "types"
import { env } from "env.mjs"
diff --git a/starters/shopify-algolia/views/Product/StarRating.tsx b/starters/shopify-algolia/views/product/star-rating.tsx
similarity index 88%
rename from starters/shopify-algolia/views/Product/StarRating.tsx
rename to starters/shopify-algolia/views/product/star-rating.tsx
index ea773055..bfc5288d 100644
--- a/starters/shopify-algolia/views/Product/StarRating.tsx
+++ b/starters/shopify-algolia/views/product/star-rating.tsx
@@ -1,4 +1,4 @@
-import { StarIcon } from "components/Icons/StarIcon"
+import { StarIcon } from "components/icons/star-icon"
import { cn } from "utils/cn"
export const StarRating = ({ rating }: { rating: number }) => {
diff --git a/starters/shopify-algolia/views/Product/Variant.tsx b/starters/shopify-algolia/views/product/variant.tsx
similarity index 95%
rename from starters/shopify-algolia/views/Product/Variant.tsx
rename to starters/shopify-algolia/views/product/variant.tsx
index 2368d983..f55d94c2 100644
--- a/starters/shopify-algolia/views/Product/Variant.tsx
+++ b/starters/shopify-algolia/views/product/variant.tsx
@@ -1,7 +1,7 @@
import type { PlatformCartItem } from "lib/shopify/types"
import Link from "next/link"
import { cn } from "utils/cn"
-import type { Combination } from "utils/productOptionsUtils"
+import type { Combination } from "utils/product-options-utils"
type VariantProps = {
singleCombination: Combination | undefined
diff --git a/starters/shopify-algolia/views/Product/VariantsSection.tsx b/starters/shopify-algolia/views/product/variants-section.tsx
similarity index 91%
rename from starters/shopify-algolia/views/Product/VariantsSection.tsx
rename to starters/shopify-algolia/views/product/variants-section.tsx
index d038ae09..1a5a2024 100644
--- a/starters/shopify-algolia/views/Product/VariantsSection.tsx
+++ b/starters/shopify-algolia/views/product/variants-section.tsx
@@ -2,9 +2,9 @@
import { PlatformVariant } from "lib/shopify/types"
import { cn } from "utils/cn"
-import { Combination, createOptionfulUrl, getAllCombinations } from "utils/productOptionsUtils"
-import { Variant } from "./Variant"
-import { useCartStore } from "stores/cartStore"
+import { Combination, createOptionfulUrl, getAllCombinations } from "utils/product-options-utils"
+import { Variant } from "./variant"
+import { useCartStore } from "stores/cart-store"
interface VariantsSectionProps {
variants: PlatformVariant[]
diff --git a/starters/shopify-algolia/views/Search/SearchView.tsx b/starters/shopify-algolia/views/search/search-view.tsx
similarity index 91%
rename from starters/shopify-algolia/views/Search/SearchView.tsx
rename to starters/shopify-algolia/views/search/search-view.tsx
index 3960e07c..4d16defb 100644
--- a/starters/shopify-algolia/views/Search/SearchView.tsx
+++ b/starters/shopify-algolia/views/search/search-view.tsx
@@ -4,17 +4,17 @@ import { unstable_cache } from "next/cache"
import { createSearchParamsCache, parseAsArrayOf, parseAsInteger, parseAsString } from "nuqs/server"
import { algolia } from "clients/search"
-import { FilterBuilder } from "lib/algolia/filterBuilder"
-import { composeFilters } from "views/Listing/composeFilters"
-import { FacetsDesktop } from "views/Listing/FacetsDesktop"
-import { HitsSection } from "views/Listing/HitsSection"
-import { PaginationSection } from "views/Listing/PaginationSection"
-import { getDemoProducts, isDemoMode } from "utils/demoUtils"
+import { FilterBuilder } from "lib/algolia/filter-builder"
+import { composeFilters } from "views/listing/compose-filters"
+import { FacetsDesktop } from "views/listing/facets-desktop"
+import { HitsSection } from "views/listing/hits-section"
+import { PaginationSection } from "views/listing/pagination-section"
+import { getDemoProducts, isDemoMode } from "utils/demo-utils"
import { env } from "env.mjs"
import { CommerceProduct, SearchParamsType } from "types"
import { HIERARCHICAL_SEPARATOR, HITS_PER_PAGE } from "constants/index"
-import { Controls } from "views/Listing/Controls"
-import { FacetsMobile } from "views/Listing/FacetsMobile"
+import { Controls } from "views/listing/controls"
+import { FacetsMobile } from "views/listing/facets-mobile"
import { SortType } from "lib/algolia"
interface SearchViewProps {
@@ -23,7 +23,6 @@ interface SearchViewProps {
collection?: PlatformCollection
disabledFacets?: string[]
}
-
export const searchParamsCache = createSearchParamsCache({
q: parseAsString.withDefault(""),
page: parseAsInteger.withDefault(1),
@@ -35,22 +34,17 @@ export const searchParamsCache = createSearchParamsCache({
colors: parseAsArrayOf(parseAsString).withDefault([]),
rating: parseAsInteger,
})
-
function makePageTitle(collection: PlatformCollection | undefined, query: string) {
if (!!collection) {
return `${collection.title}`
}
-
if (!!query.length) {
return `${query}`
}
-
return "Search"
}
-
export async function SearchView({ searchParams, disabledFacets, collection }: SearchViewProps) {
const { q, sortBy, page, ...rest } = searchParamsCache.parse(searchParams)
-
const filterBuilder = new FilterBuilder()
if (collection) {
@@ -63,7 +57,6 @@ export async function SearchView({ searchParams, disabledFacets, collection }: S
page,
composeFilters(filterBuilder, rest, HIERARCHICAL_SEPARATOR).build()
)
-
return (
diff --git a/starters/shopify-algolia/views/Settings/ProfileForm.tsx b/starters/shopify-algolia/views/settings/profile-form.tsx
similarity index 93%
rename from starters/shopify-algolia/views/Settings/ProfileForm.tsx
rename to starters/shopify-algolia/views/settings/profile-form.tsx
index 84b17358..0f4756d3 100644
--- a/starters/shopify-algolia/views/Settings/ProfileForm.tsx
+++ b/starters/shopify-algolia/views/settings/profile-form.tsx
@@ -3,14 +3,14 @@
import { PlatformUser } from "lib/shopify/types"
import { zodResolver } from "@hookform/resolvers/zod"
import { getCurrentUser, updateUser } from "app/actions/user.actions"
-import { Button } from "components/Button/Button"
-import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "components/Card/Card"
-import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "components/Form/Form"
-import { Input } from "components/Input/Input"
+import { Button } from "components/ui/button-old"
+import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "components/ui/card"
+import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "components/ui/form"
+import { Input } from "components/ui/input"
import { useForm } from "react-hook-form"
import { toast } from "sonner"
-import { useUserStore } from "stores/userStore"
+import { useUserStore } from "stores/user-store"
import { z } from "zod"
const formSchema = z.object({
diff --git a/starters/shopify-algolia/views/Settings/SettingsView.tsx b/starters/shopify-algolia/views/settings/settings-view.tsx
similarity index 81%
rename from starters/shopify-algolia/views/Settings/SettingsView.tsx
rename to starters/shopify-algolia/views/settings/settings-view.tsx
index f4fe6852..437862dd 100644
--- a/starters/shopify-algolia/views/Settings/SettingsView.tsx
+++ b/starters/shopify-algolia/views/settings/settings-view.tsx
@@ -1,8 +1,8 @@
"use client"
-import { Skeleton } from "components/Skeleton/Skeleton"
-import { ProfileForm } from "./ProfileForm"
-import { useUserStore } from "stores/userStore"
+import { Skeleton } from "components/ui/skeleton"
+import { ProfileForm } from "./profile-form"
+import { useUserStore } from "stores/user-store"
export function SettingsView() {
const user = useUserStore((s) => s.user)
diff --git a/starters/shopify-algolia/views/ThirdParties.tsx b/starters/shopify-algolia/views/third-parties.tsx
similarity index 88%
rename from starters/shopify-algolia/views/ThirdParties.tsx
rename to starters/shopify-algolia/views/third-parties.tsx
index ac7de2ff..44c96433 100644
--- a/starters/shopify-algolia/views/ThirdParties.tsx
+++ b/starters/shopify-algolia/views/third-parties.tsx
@@ -2,7 +2,7 @@ import { GoogleTagManager } from "@next/third-parties/google"
import { Analytics } from "@vercel/analytics/next"
import { SpeedInsights } from "@vercel/speed-insights/next"
import { env } from "env.mjs"
-import { getVercelFlagOverrides } from "utils/getVercelFlagOverrides"
+import { getVercelFlagOverrides } from "utils/get-vercel-flag-overrides"
export async function ThirdParties() {
const flags = await getVercelFlagOverrides()
diff --git a/starters/shopify-algolia/yarn.lock b/starters/shopify-algolia/yarn.lock
index 7e387460..5edeb521 100644
--- a/starters/shopify-algolia/yarn.lock
+++ b/starters/shopify-algolia/yarn.lock
@@ -6605,13 +6605,6 @@ create-require@^1.1.0:
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
-cross-env@^7.0.3:
- version "7.0.3"
- resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
- integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
- dependencies:
- cross-spawn "^7.0.1"
-
cross-fetch@^3.1.5:
version "3.1.8"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82"
@@ -6626,7 +6619,7 @@ cross-inspect@1.0.1:
dependencies:
tslib "^2.4.0"
-cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
+cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==