From 9a1a932863f71bf74cbca747a98a903c73c4eabd Mon Sep 17 00:00:00 2001 From: ddaoxuan Date: Thu, 17 Oct 2024 00:20:39 +0200 Subject: [PATCH] refactor: standardize naming convention --- .../app/actions/cart.actions.ts | 2 +- .../app/actions/collection.actions.ts | 4 +-- .../app/actions/product.actions.ts | 4 +-- .../app/api/reviews/ai-summary/route.ts | 2 +- .../app/api/reviews/sync/route.ts | 2 +- .../app/category/clp/[slug]/[page]/page.tsx | 2 +- .../app/category/clp/[slug]/page.tsx | 4 +-- .../app/category/plp/[slug]/page.tsx | 2 +- starters/shopify-meilisearch/app/error.tsx | 4 +-- .../app/favorites/page.tsx | 4 +-- .../shopify-meilisearch/app/global-error.tsx | 2 +- .../app/home/[bucket]/page.tsx | 12 +++---- starters/shopify-meilisearch/app/layout.tsx | 24 ++++++------- .../app/product/[slug]/draft/page.tsx | 26 +++++++------- .../app/product/[slug]/loading.tsx | 2 +- .../app/product/[slug]/metadata.ts | 4 +-- .../app/product/[slug]/opengraph-image.tsx | 2 +- .../app/product/[slug]/page.tsx | 32 ++++++++--------- .../app/reviews/[slug]/metadata.ts | 4 +-- .../app/reviews/[slug]/page.tsx | 10 +++--- .../shopify-meilisearch/app/search/page.tsx | 4 +-- .../shopify-meilisearch/app/settings/page.tsx | 2 +- starters/shopify-meilisearch/app/sitemap.ts | 2 +- .../components/{Icons => }/Icons.stories.tsx | 0 ...nouncementBar.tsx => announcement-bar.tsx} | 0 .../AuthActions.tsx => auth-actions.tsx} | 4 +-- .../Breadcrumbs.tsx => breadcrumbs.tsx} | 2 +- .../CallToAction.tsx => call-to-action.tsx} | 6 ++-- ...ableContent.tsx => expandable-content.tsx} | 2 +- .../{Footer/Footer.tsx => footer.tsx} | 0 .../GenericModal.tsx => generic-modal.tsx} | 4 +-- .../ArrowIcon.tsx => icons/arrow-icon.tsx} | 0 .../caret-sort-icon.tsx} | 0 .../CheckIcon.tsx => icons/check-icon.tsx} | 0 .../chevron-icon.tsx} | 0 .../CloseIcon.tsx => icons/close-icon.tsx} | 0 .../favorites-icon.tsx} | 0 .../filters-icon.tsx} | 0 .../HeartIcon.tsx => icons/heart-icon.tsx} | 0 .../RobotIcon.tsx => icons/robot-icon.tsx} | 0 .../SearchIcon.tsx => icons/search-icon.tsx} | 0 .../StarIcon.tsx => icons/star-icon.tsx} | 0 .../thin-search-icon.tsx} | 0 .../LoadingDots.tsx => loading-dots.tsx} | 0 .../components/{Logo/Logo.tsx => logo.tsx} | 0 .../LoginModal.tsx => modals/login-modal.tsx} | 16 ++++----- .../{Modals/Modals.tsx => modals/modals.tsx} | 10 +++--- .../review-modal.tsx} | 16 ++++----- .../search-modal.tsx} | 16 ++++----- .../signup-modal.tsx} | 16 ++++----- .../autocomplete.tsx} | 8 ++--- .../Cart.tsx => navigation-bar/cart.tsx} | 4 +-- .../favorites.tsx} | 2 +- .../mobile-inline-script.ts} | 0 .../navigation-bar.tsx} | 24 ++++++------- .../navigation-item.tsx} | 2 +- .../open-cart-button.tsx} | 2 +- .../search-button.tsx} | 6 ++-- .../types.ts | 0 .../variants/image-grid.tsx} | 0 .../variants/text-grid.tsx} | 0 .../variants/text-image-grid.tsx} | 0 .../ProductCard.tsx => product-card.tsx} | 4 +-- .../ProfileBar.tsx => profile-bar.tsx} | 4 +-- .../ProfileMenu.tsx => profile-menu.tsx} | 8 ++--- ...uickAddButton.tsx => quick-add-button.tsx} | 8 ++--- .../QuickAdd.tsx => quick-add.tsx} | 4 +-- .../{Spinner/Spinner.tsx => spinner.tsx} | 0 .../Accordion.tsx => ui/accordion.tsx} | 2 +- .../{Alert/Alert.tsx => ui/alert.tsx} | 0 .../{Badge/Badge.tsx => ui/badge.tsx} | 0 .../Breadcrumb.tsx => ui/breadcrumb.tsx} | 2 +- .../{Button/Button.tsx => ui/button-old.tsx} | 0 .../{Button/ButtonNew.tsx => ui/button.tsx} | 0 .../components/{Card/Card.tsx => ui/card.tsx} | 0 .../Carousel.tsx => ui/carousel.tsx} | 4 +-- .../Checkbox.tsx => ui/checkbox.tsx} | 2 +- .../{Dialog/Dialog.tsx => ui/dialog.tsx} | 0 .../DropdownMenu.tsx => ui/dropdown-menu.tsx} | 0 .../components/{Form/Form.tsx => ui/form.tsx} | 4 ++- .../{Input/Input.tsx => ui/input.tsx} | 0 .../{Label/Label.tsx => ui/label.tsx} | 0 .../Pagination.tsx => ui/pagination.tsx} | 4 +-- .../{Select/Select.tsx => ui/select.tsx} | 6 ++-- .../{Sheet/Sheet.tsx => ui/sheet.tsx} | 0 .../Skeleton.tsx => ui/skeleton.tsx} | 0 .../Textarea.tsx => ui/textarea.tsx} | 0 ...Builder.test.ts => filter-builder.test.ts} | 2 +- .../{filterBuilder.ts => filter-builder.ts} | 0 starters/shopify-meilisearch/middleware.ts | 2 +- ...ddProductStore.ts => add-product-store.ts} | 2 +- .../stores/{cartStore.ts => cart-store.ts} | 0 ...ionStore.ts => filter-transition-store.ts} | 0 .../{filtersStore.ts => filters-store.ts} | 0 .../stores/{modalStore.ts => modal-store.ts} | 0 .../stores/{userStore.ts => user-store.ts} | 0 .../accordion.stories.tsx} | 2 +- .../announcement-bar.stories.tsx} | 2 +- .../breadcrumbs.stories.tsx} | 2 +- .../button.stories.tsx} | 2 +- .../call-to-action.stories.tsx} | 2 +- .../card.stories.tsx} | 2 +- .../carousel.stories.tsx} | 2 +- .../checkbox.stories.tsx} | 4 +-- .../dialog.stories.tsx} | 2 +- .../dropdown-menu.stories.tsx} | 2 +- .../footer.stories.tsx} | 2 +- .../form.stories.tsx} | 6 ++-- .../stories/icons.stories.tsx | 35 +++++++++++++++++++ .../input.stories.tsx} | 4 +-- .../label.stories.tsx} | 2 +- .../loading-dots.stories.tsx} | 2 +- .../pagination.stories.tsx} | 2 +- .../select.stories.tsx} | 2 +- .../sheet.stories.tsx} | 4 +-- .../skeleton.stories.tsx} | 2 +- .../spinner.stories.tsx} | 2 +- .../shopify-meilisearch/tsconfig.tsbuildinfo | 1 + .../utils/{abTesting.ts => ab-testing.ts} | 0 .../utils/{demoUtils.ts => demo-utils.ts} | 0 .../utils/{getCookie.ts => get-cookie.ts} | 0 ...rrides.ts => get-vercel-flag-overrides.ts} | 0 ...ghlightedText.tsx => highlighted-text.tsx} | 0 .../{makeKeywords.ts => make-keywords.ts} | 0 ...rencyToSign.ts => map-currency-to-sign.ts} | 0 ...tionsUtils.ts => product-options-utils.ts} | 0 ...useAutocomplete.ts => use-autocomplete.ts} | 0 ...chicalMenu.ts => use-hierarchical-menu.ts} | 0 .../{useReadMore.ts => use-read-more.ts} | 0 .../{Cart/CartItem.tsx => cart/cart-item.tsx} | 4 +-- .../CartSheet.tsx => cart/cart-sheet.tsx} | 10 +++--- .../{Cart/CartView.tsx => cart/cart-view.tsx} | 6 ++-- .../change-quantity-button.tsx} | 4 +-- .../delete-button.tsx} | 4 +-- .../category-view.tsx} | 2 +- .../page-skeleton.tsx} | 2 +- ...{DemoModeAlert.tsx => demo-mode-alert.tsx} | 4 +-- .../{DraftToolbar.tsx => draft-toolbar.tsx} | 0 .../views/{FlagValues.tsx => flag-values.tsx} | 2 +- .../{GithubBadge.tsx => github-badge.tsx} | 0 .../best-offers-skeleton.tsx} | 4 +-- .../carousel-section.tsx} | 6 ++-- .../categories-section.tsx} | 4 +-- .../everything-under-section.tsx} | 6 ++-- .../hero-section.tsx} | 2 +- .../products-week-section.tsx} | 6 ++-- .../category-facet.tsx} | 4 +-- .../compose-filters.test.ts} | 4 +-- .../compose-filters.ts} | 2 +- .../Controls.tsx => listing/controls.tsx} | 4 +-- .../{Listing/Facet.tsx => listing/facet.tsx} | 6 ++-- .../facets-content.tsx} | 14 ++++---- .../facets-desktop.tsx} | 4 +-- .../facets-mobile.tsx} | 12 +++---- .../hide-filters.tsx} | 6 ++-- .../hits-section.tsx} | 2 +- .../page-skeleton.tsx} | 2 +- .../pagination-section.tsx} | 2 +- .../price-facet.tsx} | 6 ++-- .../rating-facet.tsx} | 8 ++--- .../search-facet.tsx} | 4 +-- .../Sorter.tsx => listing/sorter.tsx} | 4 +-- .../add-to-cart-button.tsx} | 10 +++--- .../back-button.tsx} | 2 +- .../center-image-section.tsx} | 2 +- .../faq-section.tsx} | 2 +- .../favorite-marker.tsx} | 6 ++-- .../page-skeleton.tsx} | 4 +-- .../product-added-alert.tsx} | 10 +++--- .../product-images.tsx} | 6 ++-- .../product-title.tsx} | 0 .../review-button.tsx} | 4 +-- .../review-card.tsx} | 6 ++-- .../reviews-section.tsx} | 10 +++--- .../right-section.tsx} | 0 .../side-images.tsx} | 2 +- .../similar-product-section-skeleton.tsx} | 2 +- .../similar-products-section.tsx} | 8 ++--- .../star-rating.tsx} | 2 +- .../Variant.tsx => product/variant.tsx} | 2 +- .../variants-section.tsx} | 6 ++-- .../SearchView.tsx => search/search-view.tsx} | 16 ++++----- .../profile-form.tsx} | 10 +++--- .../settings-view.tsx} | 6 ++-- .../{ThirdParties.tsx => third-parties.tsx} | 2 +- 185 files changed, 373 insertions(+), 335 deletions(-) rename starters/shopify-meilisearch/components/{Icons => }/Icons.stories.tsx (100%) rename starters/shopify-meilisearch/components/{AnnouncementBar/AnnouncementBar.tsx => announcement-bar.tsx} (100%) rename starters/shopify-meilisearch/components/{ProfileMenu/AuthActions.tsx => auth-actions.tsx} (81%) rename starters/shopify-meilisearch/components/{Breadcrumbs/Breadcrumbs.tsx => breadcrumbs.tsx} (94%) rename starters/shopify-meilisearch/components/{CallToAction/CallToAction.tsx => call-to-action.tsx} (87%) rename starters/shopify-meilisearch/components/{ExpandableContent/ExpandableContent.tsx => expandable-content.tsx} (96%) rename starters/shopify-meilisearch/components/{Footer/Footer.tsx => footer.tsx} (100%) rename starters/shopify-meilisearch/components/{GenericModal/GenericModal.tsx => generic-modal.tsx} (92%) rename starters/shopify-meilisearch/components/{Icons/ArrowIcon.tsx => icons/arrow-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{Icons/CaretSortIcon.tsx => icons/caret-sort-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{Icons/CheckIcon.tsx => icons/check-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{Icons/ChevronIcon.tsx => icons/chevron-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{Icons/CloseIcon.tsx => icons/close-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{Icons/FavoritesIcon.tsx => icons/favorites-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{Icons/FiltersIcon.tsx => icons/filters-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{Icons/HeartIcon.tsx => icons/heart-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{Icons/RobotIcon.tsx => icons/robot-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{Icons/SearchIcon.tsx => icons/search-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{Icons/StarIcon.tsx => icons/star-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{Icons/ThinSearchIcon.tsx => icons/thin-search-icon.tsx} (100%) rename starters/shopify-meilisearch/components/{LoadingDots/LoadingDots.tsx => loading-dots.tsx} (100%) rename starters/shopify-meilisearch/components/{Logo/Logo.tsx => logo.tsx} (100%) rename starters/shopify-meilisearch/components/{Modals/LoginModal.tsx => modals/login-modal.tsx} (88%) rename starters/shopify-meilisearch/components/{Modals/Modals.tsx => modals/modals.tsx} (64%) rename starters/shopify-meilisearch/components/{Modals/ReviewModal.tsx => modals/review-modal.tsx} (93%) rename starters/shopify-meilisearch/components/{Modals/SearchModal.tsx => modals/search-modal.tsx} (91%) rename starters/shopify-meilisearch/components/{Modals/SignupModal.tsx => modals/signup-modal.tsx} (88%) rename starters/shopify-meilisearch/components/{NavigationBar/Autocomplete.tsx => navigation-bar/autocomplete.tsx} (91%) rename starters/shopify-meilisearch/components/{NavigationBar/Cart.tsx => navigation-bar/cart.tsx} (92%) rename starters/shopify-meilisearch/components/{NavigationBar/Favorites.tsx => navigation-bar/favorites.tsx} (88%) rename starters/shopify-meilisearch/components/{NavigationBar/mobileInlineScript.ts => navigation-bar/mobile-inline-script.ts} (100%) rename starters/shopify-meilisearch/components/{NavigationBar/NavigationBar.tsx => navigation-bar/navigation-bar.tsx} (85%) rename starters/shopify-meilisearch/components/{NavigationBar/NavigationItem.tsx => navigation-bar/navigation-item.tsx} (91%) rename starters/shopify-meilisearch/components/{NavigationBar/OpenCartButton.tsx => navigation-bar/open-cart-button.tsx} (84%) rename starters/shopify-meilisearch/components/{NavigationBar/SearchButton.tsx => navigation-bar/search-button.tsx} (66%) rename starters/shopify-meilisearch/components/{NavigationBar => navigation-bar}/types.ts (100%) rename starters/shopify-meilisearch/components/{NavigationBar/variants/ImageGridVariant.tsx => navigation-bar/variants/image-grid.tsx} (100%) rename starters/shopify-meilisearch/components/{NavigationBar/variants/TextGridVariant.tsx => navigation-bar/variants/text-grid.tsx} (100%) rename starters/shopify-meilisearch/components/{NavigationBar/variants/TextImageGridVariant.tsx => navigation-bar/variants/text-image-grid.tsx} (100%) rename starters/shopify-meilisearch/components/{ProductCard/ProductCard.tsx => product-card.tsx} (94%) rename starters/shopify-meilisearch/components/{ProfileMenu/ProfileBar.tsx => profile-bar.tsx} (91%) rename starters/shopify-meilisearch/components/{ProfileMenu/ProfileMenu.tsx => profile-menu.tsx} (74%) rename starters/shopify-meilisearch/components/{ProductCard/QuickAddButton.tsx => quick-add-button.tsx} (89%) rename starters/shopify-meilisearch/components/{ProductCard/QuickAdd.tsx => quick-add.tsx} (91%) rename starters/shopify-meilisearch/components/{Spinner/Spinner.tsx => spinner.tsx} (100%) rename starters/shopify-meilisearch/components/{Accordion/Accordion.tsx => ui/accordion.tsx} (97%) rename starters/shopify-meilisearch/components/{Alert/Alert.tsx => ui/alert.tsx} (100%) rename starters/shopify-meilisearch/components/{Badge/Badge.tsx => ui/badge.tsx} (100%) rename starters/shopify-meilisearch/components/{Breadcrumb/Breadcrumb.tsx => ui/breadcrumb.tsx} (97%) rename starters/shopify-meilisearch/components/{Button/Button.tsx => ui/button-old.tsx} (100%) rename starters/shopify-meilisearch/components/{Button/ButtonNew.tsx => ui/button.tsx} (100%) rename starters/shopify-meilisearch/components/{Card/Card.tsx => ui/card.tsx} (100%) rename starters/shopify-meilisearch/components/{Carousel/Carousel.tsx => ui/carousel.tsx} (98%) rename starters/shopify-meilisearch/components/{Checkbox/Checkbox.tsx => ui/checkbox.tsx} (95%) rename starters/shopify-meilisearch/components/{Dialog/Dialog.tsx => ui/dialog.tsx} (100%) rename starters/shopify-meilisearch/components/{DropdownMenu/DropdownMenu.tsx => ui/dropdown-menu.tsx} (100%) rename starters/shopify-meilisearch/components/{Form/Form.tsx => ui/form.tsx} (98%) rename starters/shopify-meilisearch/components/{Input/Input.tsx => ui/input.tsx} (100%) rename starters/shopify-meilisearch/components/{Label/Label.tsx => ui/label.tsx} (100%) rename starters/shopify-meilisearch/components/{Pagination/Pagination.tsx => ui/pagination.tsx} (96%) rename starters/shopify-meilisearch/components/{Select/Select.tsx => ui/select.tsx} (97%) rename starters/shopify-meilisearch/components/{Sheet/Sheet.tsx => ui/sheet.tsx} (100%) rename starters/shopify-meilisearch/components/{Skeleton/Skeleton.tsx => ui/skeleton.tsx} (100%) rename starters/shopify-meilisearch/components/{Textarea/Textarea.tsx => ui/textarea.tsx} (100%) rename starters/shopify-meilisearch/lib/meilisearch/{filterBuilder.test.ts => filter-builder.test.ts} (99%) rename starters/shopify-meilisearch/lib/meilisearch/{filterBuilder.ts => filter-builder.ts} (100%) rename starters/shopify-meilisearch/stores/{addProductStore.ts => add-product-store.ts} (91%) rename starters/shopify-meilisearch/stores/{cartStore.ts => cart-store.ts} (100%) rename starters/shopify-meilisearch/stores/{filterTransitionStore.ts => filter-transition-store.ts} (100%) rename starters/shopify-meilisearch/stores/{filtersStore.ts => filters-store.ts} (100%) rename starters/shopify-meilisearch/stores/{modalStore.ts => modal-store.ts} (100%) rename starters/shopify-meilisearch/stores/{userStore.ts => user-store.ts} (100%) rename starters/shopify-meilisearch/{components/Accordion/Accordion.stories.tsx => stories/accordion.stories.tsx} (98%) rename starters/shopify-meilisearch/{components/AnnouncementBar/AnnouncementBar.stories.tsx => stories/announcement-bar.stories.tsx} (84%) rename starters/shopify-meilisearch/{components/Breadcrumbs/Breadcrumbs.stories.tsx => stories/breadcrumbs.stories.tsx} (88%) rename starters/shopify-meilisearch/{components/Button/Button.stories.tsx => stories/button.stories.tsx} (93%) rename starters/shopify-meilisearch/{components/CallToAction/CallToAction.stories.tsx => stories/call-to-action.stories.tsx} (84%) rename starters/shopify-meilisearch/{components/Card/Card.stories.tsx => stories/card.stories.tsx} (97%) rename starters/shopify-meilisearch/{components/Carousel/Carousel.stories.tsx => stories/carousel.stories.tsx} (90%) rename starters/shopify-meilisearch/{components/Checkbox/Checkbox.stories.tsx => stories/checkbox.stories.tsx} (80%) rename starters/shopify-meilisearch/{components/Dialog/Dialog.stories.tsx => stories/dialog.stories.tsx} (96%) rename starters/shopify-meilisearch/{components/DropdownMenu/DropdownMenu.stories.tsx => stories/dropdown-menu.stories.tsx} (94%) rename starters/shopify-meilisearch/{components/Footer/Footer.stories.tsx => stories/footer.stories.tsx} (86%) rename starters/shopify-meilisearch/{components/Form/Form.stories.tsx => stories/form.stories.tsx} (91%) create mode 100644 starters/shopify-meilisearch/stories/icons.stories.tsx rename starters/shopify-meilisearch/{components/Input/Input.stories.tsx => stories/input.stories.tsx} (79%) rename starters/shopify-meilisearch/{components/Label/Label.stories.tsx => stories/label.stories.tsx} (87%) rename starters/shopify-meilisearch/{components/LoadingDots/LoadingDots.stories.tsx => stories/loading-dots.stories.tsx} (85%) rename starters/shopify-meilisearch/{components/Pagination/Pagination.stories.tsx => stories/pagination.stories.tsx} (95%) rename starters/shopify-meilisearch/{components/Select/Select.stories.tsx => stories/select.stories.tsx} (95%) rename starters/shopify-meilisearch/{components/Sheet/Sheet.stories.tsx => stories/sheet.stories.tsx} (95%) rename starters/shopify-meilisearch/{components/Skeleton/Skeleton.stories.tsx => stories/skeleton.stories.tsx} (86%) rename starters/shopify-meilisearch/{components/Spinner/Spinner.stories.tsx => stories/spinner.stories.tsx} (86%) create mode 100644 starters/shopify-meilisearch/tsconfig.tsbuildinfo rename starters/shopify-meilisearch/utils/{abTesting.ts => ab-testing.ts} (100%) rename starters/shopify-meilisearch/utils/{demoUtils.ts => demo-utils.ts} (100%) rename starters/shopify-meilisearch/utils/{getCookie.ts => get-cookie.ts} (100%) rename starters/shopify-meilisearch/utils/{getVercelFlagOverrides.ts => get-vercel-flag-overrides.ts} (100%) rename starters/shopify-meilisearch/utils/{highlightedText.tsx => highlighted-text.tsx} (100%) rename starters/shopify-meilisearch/utils/{makeKeywords.ts => make-keywords.ts} (100%) rename starters/shopify-meilisearch/utils/{mapCurrencyToSign.ts => map-currency-to-sign.ts} (100%) rename starters/shopify-meilisearch/utils/{productOptionsUtils.ts => product-options-utils.ts} (100%) rename starters/shopify-meilisearch/utils/{useAutocomplete.ts => use-autocomplete.ts} (100%) rename starters/shopify-meilisearch/utils/{useHierarchicalMenu.ts => use-hierarchical-menu.ts} (100%) rename starters/shopify-meilisearch/utils/{useReadMore.ts => use-read-more.ts} (100%) rename starters/shopify-meilisearch/views/{Cart/CartItem.tsx => cart/cart-item.tsx} (94%) rename starters/shopify-meilisearch/views/{Cart/CartSheet.tsx => cart/cart-sheet.tsx} (94%) rename starters/shopify-meilisearch/views/{Cart/CartView.tsx => cart/cart-view.tsx} (80%) rename starters/shopify-meilisearch/views/{Cart/ChangeQuantityButton.tsx => cart/change-quantity-button.tsx} (91%) rename starters/shopify-meilisearch/views/{Cart/DeleteButton.tsx => cart/delete-button.tsx} (88%) rename starters/shopify-meilisearch/views/{Category/CategoryView.tsx => category/category-view.tsx} (90%) rename starters/shopify-meilisearch/views/{Category/PageSkeleton.tsx => category/page-skeleton.tsx} (96%) rename starters/shopify-meilisearch/views/{DemoModeAlert.tsx => demo-mode-alert.tsx} (95%) rename starters/shopify-meilisearch/views/{DraftToolbar.tsx => draft-toolbar.tsx} (100%) rename starters/shopify-meilisearch/views/{FlagValues.tsx => flag-values.tsx} (87%) rename starters/shopify-meilisearch/views/{GithubBadge.tsx => github-badge.tsx} (100%) rename starters/shopify-meilisearch/views/{Homepage/BestOffersSection.tsx => homepage/best-offers-skeleton.tsx} (87%) rename starters/shopify-meilisearch/views/{Homepage/CarouselSection.tsx => homepage/carousel-section.tsx} (91%) rename starters/shopify-meilisearch/views/{Homepage/CategoriesSection.tsx => homepage/categories-section.tsx} (95%) rename starters/shopify-meilisearch/views/{Homepage/EverythingUnderSection.tsx => homepage/everything-under-section.tsx} (88%) rename starters/shopify-meilisearch/views/{Homepage/HeroSection.tsx => homepage/hero-section.tsx} (95%) rename starters/shopify-meilisearch/views/{Homepage/ProductsWeekSection.tsx => homepage/products-week-section.tsx} (94%) rename starters/shopify-meilisearch/views/{Listing/CategoryFacet.tsx => listing/category-facet.tsx} (97%) rename starters/shopify-meilisearch/views/{Listing/composeFilters.test.ts => listing/compose-filters.test.ts} (96%) rename starters/shopify-meilisearch/views/{Listing/composeFilters.ts => listing/compose-filters.ts} (98%) rename starters/shopify-meilisearch/views/{Listing/Controls.tsx => listing/controls.tsx} (83%) rename starters/shopify-meilisearch/views/{Listing/Facet.tsx => listing/facet.tsx} (89%) rename starters/shopify-meilisearch/views/{Listing/FacetsContent.tsx => listing/facets-content.tsx} (95%) rename starters/shopify-meilisearch/views/{Listing/FacetsDesktop.tsx => listing/facets-desktop.tsx} (89%) rename starters/shopify-meilisearch/views/{Listing/FacetsMobile.tsx => listing/facets-mobile.tsx} (72%) rename starters/shopify-meilisearch/views/{Listing/HideFilters.tsx => listing/hide-filters.tsx} (75%) rename starters/shopify-meilisearch/views/{Listing/HitsSection.tsx => listing/hits-section.tsx} (89%) rename starters/shopify-meilisearch/views/{Listing/PageSkeleton.tsx => listing/page-skeleton.tsx} (96%) rename starters/shopify-meilisearch/views/{Listing/PaginationSection.tsx => listing/pagination-section.tsx} (95%) rename starters/shopify-meilisearch/views/{Listing/PriceFacet.tsx => listing/price-facet.tsx} (92%) rename starters/shopify-meilisearch/views/{Listing/RatingFacet.tsx => listing/rating-facet.tsx} (87%) rename starters/shopify-meilisearch/views/{Listing/SearchFacet.tsx => listing/search-facet.tsx} (93%) rename starters/shopify-meilisearch/views/{Listing/Sorter.tsx => listing/sorter.tsx} (93%) rename starters/shopify-meilisearch/views/{Product/AddToCartButton.tsx => product/add-to-cart-button.tsx} (88%) rename starters/shopify-meilisearch/views/{Product/BackButton.tsx => product/back-button.tsx} (86%) rename starters/shopify-meilisearch/views/{Product/CenterImageSection.tsx => product/center-image-section.tsx} (94%) rename starters/shopify-meilisearch/views/{Product/FaqSection.tsx => product/faq-section.tsx} (98%) rename starters/shopify-meilisearch/views/{Product/FavoriteMarker.tsx => product/favorite-marker.tsx} (90%) rename starters/shopify-meilisearch/views/{Product/PageSkeleton.tsx => product/page-skeleton.tsx} (94%) rename starters/shopify-meilisearch/views/{Product/ProductAddedAlert.tsx => product/product-added-alert.tsx} (90%) rename starters/shopify-meilisearch/views/{Product/ProductImages.tsx => product/product-images.tsx} (85%) rename starters/shopify-meilisearch/views/{Product/ProductTitle.tsx => product/product-title.tsx} (100%) rename starters/shopify-meilisearch/views/{Product/ReviewButton.tsx => product/review-button.tsx} (80%) rename starters/shopify-meilisearch/views/{Product/ReviewCard.tsx => product/review-card.tsx} (84%) rename starters/shopify-meilisearch/views/{Product/ReviewsSection.tsx => product/reviews-section.tsx} (92%) rename starters/shopify-meilisearch/views/{Product/RightSection.tsx => product/right-section.tsx} (100%) rename starters/shopify-meilisearch/views/{Product/SideImages.tsx => product/side-images.tsx} (98%) rename starters/shopify-meilisearch/views/{Product/SimilarProductsSectionSkeleton.tsx => product/similar-product-section-skeleton.tsx} (92%) rename starters/shopify-meilisearch/views/{Product/SimilarProductsSection.tsx => product/similar-products-section.tsx} (92%) rename starters/shopify-meilisearch/views/{Product/StarRating.tsx => product/star-rating.tsx} (88%) rename starters/shopify-meilisearch/views/{Product/Variant.tsx => product/variant.tsx} (95%) rename starters/shopify-meilisearch/views/{Product/VariantsSection.tsx => product/variants-section.tsx} (91%) rename starters/shopify-meilisearch/views/{Search/SearchView.tsx => search/search-view.tsx} (92%) rename starters/shopify-meilisearch/views/{Settings/ProfileForm.tsx => settings/profile-form.tsx} (93%) rename starters/shopify-meilisearch/views/{Settings/SettingsView.tsx => settings/settings-view.tsx} (81%) rename starters/shopify-meilisearch/views/{ThirdParties.tsx => third-parties.tsx} (88%) diff --git a/starters/shopify-meilisearch/app/actions/cart.actions.ts b/starters/shopify-meilisearch/app/actions/cart.actions.ts index 4459ef29..ca8a1e49 100644 --- a/starters/shopify-meilisearch/app/actions/cart.actions.ts +++ b/starters/shopify-meilisearch/app/actions/cart.actions.ts @@ -4,7 +4,7 @@ import { revalidateTag, unstable_cache } from "next/cache" import { cookies } from "next/headers" import { storefrontClient } from "clients/storefrontClient" 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-meilisearch/app/actions/collection.actions.ts b/starters/shopify-meilisearch/app/actions/collection.actions.ts index 325f6430..9ea8dd2d 100644 --- a/starters/shopify-meilisearch/app/actions/collection.actions.ts +++ b/starters/shopify-meilisearch/app/actions/collection.actions.ts @@ -2,8 +2,8 @@ import { unstable_cache } from "next/cache" import { meilisearch } from "clients/search" -import { ComparisonOperators, FilterBuilder } from "lib/meilisearch/filterBuilder" -import { getDemoSingleCategory, isDemoMode } from "utils/demoUtils" +import { ComparisonOperators, FilterBuilder } from "lib/meilisearch/filter-builder" +import { getDemoSingleCategory, isDemoMode } from "utils/demo-utils" import type { PlatformCollection } from "lib/shopify/types" import { env } from "env.mjs" diff --git a/starters/shopify-meilisearch/app/actions/product.actions.ts b/starters/shopify-meilisearch/app/actions/product.actions.ts index 17c267ce..3dfe72b2 100644 --- a/starters/shopify-meilisearch/app/actions/product.actions.ts +++ b/starters/shopify-meilisearch/app/actions/product.actions.ts @@ -6,8 +6,8 @@ import { env } from "env.mjs" import { meilisearch } from "clients/search" import type { Review } from "lib/reviews/types" -import { ComparisonOperators, FilterBuilder } from "lib/meilisearch/filterBuilder" -import { getDemoProductReviews, getDemoSingleProduct, isDemoMode } from "utils/demoUtils" +import { ComparisonOperators, FilterBuilder } from "lib/meilisearch/filter-builder" +import { getDemoProductReviews, getDemoSingleProduct, isDemoMode } from "utils/demo-utils" import type { CommerceProduct } from "types" import { notifyOptIn } from "utils/opt-in" diff --git a/starters/shopify-meilisearch/app/api/reviews/ai-summary/route.ts b/starters/shopify-meilisearch/app/api/reviews/ai-summary/route.ts index 0fb074b4..608bbbba 100644 --- a/starters/shopify-meilisearch/app/api/reviews/ai-summary/route.ts +++ b/starters/shopify-meilisearch/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-meilisearch/app/api/reviews/sync/route.ts b/starters/shopify-meilisearch/app/api/reviews/sync/route.ts index 51183e6f..c681d2d7 100644 --- a/starters/shopify-meilisearch/app/api/reviews/sync/route.ts +++ b/starters/shopify-meilisearch/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-meilisearch/app/category/clp/[slug]/[page]/page.tsx b/starters/shopify-meilisearch/app/category/clp/[slug]/[page]/page.tsx index ba9b0dfb..df07fa7f 100644 --- a/starters/shopify-meilisearch/app/category/clp/[slug]/[page]/page.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/app/category/clp/[slug]/page.tsx b/starters/shopify-meilisearch/app/category/clp/[slug]/page.tsx index 6f7210a4..e92ff154 100644 --- a/starters/shopify-meilisearch/app/category/clp/[slug]/page.tsx +++ b/starters/shopify-meilisearch/app/category/clp/[slug]/page.tsx @@ -2,8 +2,8 @@ import { PlatformCollection } from "lib/shopify/types" import { meilisearch } 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-meilisearch/app/category/plp/[slug]/page.tsx b/starters/shopify-meilisearch/app/category/plp/[slug]/page.tsx index a1ca05ef..07f6e2ee 100644 --- a/starters/shopify-meilisearch/app/category/plp/[slug]/page.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/app/error.tsx b/starters/shopify-meilisearch/app/error.tsx index 454e8dcf..842d344b 100644 --- a/starters/shopify-meilisearch/app/error.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/app/favorites/page.tsx b/starters/shopify-meilisearch/app/favorites/page.tsx index 432e1bce..26984cc5 100644 --- a/starters/shopify-meilisearch/app/favorites/page.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/app/global-error.tsx b/starters/shopify-meilisearch/app/global-error.tsx index 754630ea..ff65f4a8 100644 --- a/starters/shopify-meilisearch/app/global-error.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/app/home/[bucket]/page.tsx b/starters/shopify-meilisearch/app/home/[bucket]/page.tsx index 9e78392c..55197a79 100644 --- a/starters/shopify-meilisearch/app/home/[bucket]/page.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/app/layout.tsx b/starters/shopify-meilisearch/app/layout.tsx index 233d5c0a..edfb407f 100644 --- a/starters/shopify-meilisearch/app/layout.tsx +++ b/starters/shopify-meilisearch/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 { 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" +import type { NavItem } from "components/navigation-bar/types" +import { NavigationBar } from "components/navigation-bar/navigation-bar" +import { mobileInlineScript } from "components/navigation-bar/mobile-inline-script" +import { CallToAction } from "components/call-to-action" +import { Footer } from "components/footer" +import { Modals } from "components/modals/modals" -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-meilisearch/app/product/[slug]/draft/page.tsx b/starters/shopify-meilisearch/app/product/[slug]/draft/page.tsx index 966515eb..ce212998 100644 --- a/starters/shopify-meilisearch/app/product/[slug]/draft/page.tsx +++ b/starters/shopify-meilisearch/app/product/[slug]/draft/page.tsx @@ -5,21 +5,21 @@ import { Suspense } from "react" import { storefrontClient } from "clients/storefrontClient" 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 { SimilarProductsSection } from "views/Product/SimilarProductsSection" -import { SimilarProductsSectionSkeleton } from "views/Product/SimilarProductsSectionSkeleton" -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 { SimilarProductsSection } from "views/product/similar-products-section" +import { SimilarProductsSectionSkeleton } from "views/product/similar-product-section-skeleton" +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-meilisearch/app/product/[slug]/loading.tsx b/starters/shopify-meilisearch/app/product/[slug]/loading.tsx index 84d862d9..124e2707 100644 --- a/starters/shopify-meilisearch/app/product/[slug]/loading.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/app/product/[slug]/metadata.ts b/starters/shopify-meilisearch/app/product/[slug]/metadata.ts index bae2b72f..f76bd3b3 100644 --- a/starters/shopify-meilisearch/app/product/[slug]/metadata.ts +++ b/starters/shopify-meilisearch/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-meilisearch/app/product/[slug]/opengraph-image.tsx b/starters/shopify-meilisearch/app/product/[slug]/opengraph-image.tsx index ae65d3f5..bb8390dc 100644 --- a/starters/shopify-meilisearch/app/product/[slug]/opengraph-image.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/app/product/[slug]/page.tsx b/starters/shopify-meilisearch/app/product/[slug]/page.tsx index 2f4b6fd0..00abc8ad 100644 --- a/starters/shopify-meilisearch/app/product/[slug]/page.tsx +++ b/starters/shopify-meilisearch/app/product/[slug]/page.tsx @@ -1,29 +1,29 @@ import { notFound } from "next/navigation" import { Suspense } from "react" import { getProduct, getProductReviews } 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 { meilisearch } 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-meilisearch/app/reviews/[slug]/metadata.ts b/starters/shopify-meilisearch/app/reviews/[slug]/metadata.ts index cac9ced9..32e635ae 100644 --- a/starters/shopify-meilisearch/app/reviews/[slug]/metadata.ts +++ b/starters/shopify-meilisearch/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-meilisearch/app/reviews/[slug]/page.tsx b/starters/shopify-meilisearch/app/reviews/[slug]/page.tsx index 0d79c684..46d950ac 100644 --- a/starters/shopify-meilisearch/app/reviews/[slug]/page.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/app/search/page.tsx b/starters/shopify-meilisearch/app/search/page.tsx index 7084610b..7c0b1b63 100644 --- a/starters/shopify-meilisearch/app/search/page.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/app/settings/page.tsx b/starters/shopify-meilisearch/app/settings/page.tsx index 25d2ccc8..f2335568 100644 --- a/starters/shopify-meilisearch/app/settings/page.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/app/sitemap.ts b/starters/shopify-meilisearch/app/sitemap.ts index 35fc7a96..138a07d2 100644 --- a/starters/shopify-meilisearch/app/sitemap.ts +++ b/starters/shopify-meilisearch/app/sitemap.ts @@ -1,7 +1,7 @@ import { env } from "env.mjs" import { MetadataRoute } from "next" import { meilisearch } 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-meilisearch/components/Icons/Icons.stories.tsx b/starters/shopify-meilisearch/components/Icons.stories.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/Icons.stories.tsx rename to starters/shopify-meilisearch/components/Icons.stories.tsx diff --git a/starters/shopify-meilisearch/components/AnnouncementBar/AnnouncementBar.tsx b/starters/shopify-meilisearch/components/announcement-bar.tsx similarity index 100% rename from starters/shopify-meilisearch/components/AnnouncementBar/AnnouncementBar.tsx rename to starters/shopify-meilisearch/components/announcement-bar.tsx diff --git a/starters/shopify-meilisearch/components/ProfileMenu/AuthActions.tsx b/starters/shopify-meilisearch/components/auth-actions.tsx similarity index 81% rename from starters/shopify-meilisearch/components/ProfileMenu/AuthActions.tsx rename to starters/shopify-meilisearch/components/auth-actions.tsx index d23a05cc..73dcf4c6 100644 --- a/starters/shopify-meilisearch/components/ProfileMenu/AuthActions.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Breadcrumbs/Breadcrumbs.tsx b/starters/shopify-meilisearch/components/breadcrumbs.tsx similarity index 94% rename from starters/shopify-meilisearch/components/Breadcrumbs/Breadcrumbs.tsx rename to starters/shopify-meilisearch/components/breadcrumbs.tsx index 551ed4c4..454f7738 100644 --- a/starters/shopify-meilisearch/components/Breadcrumbs/Breadcrumbs.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/CallToAction/CallToAction.tsx b/starters/shopify-meilisearch/components/call-to-action.tsx similarity index 87% rename from starters/shopify-meilisearch/components/CallToAction/CallToAction.tsx rename to starters/shopify-meilisearch/components/call-to-action.tsx index 2a343426..c39ac766 100644 --- a/starters/shopify-meilisearch/components/CallToAction/CallToAction.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/ExpandableContent/ExpandableContent.tsx b/starters/shopify-meilisearch/components/expandable-content.tsx similarity index 96% rename from starters/shopify-meilisearch/components/ExpandableContent/ExpandableContent.tsx rename to starters/shopify-meilisearch/components/expandable-content.tsx index 96e461f4..f43d66d4 100644 --- a/starters/shopify-meilisearch/components/ExpandableContent/ExpandableContent.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Footer/Footer.tsx b/starters/shopify-meilisearch/components/footer.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Footer/Footer.tsx rename to starters/shopify-meilisearch/components/footer.tsx diff --git a/starters/shopify-meilisearch/components/GenericModal/GenericModal.tsx b/starters/shopify-meilisearch/components/generic-modal.tsx similarity index 92% rename from starters/shopify-meilisearch/components/GenericModal/GenericModal.tsx rename to starters/shopify-meilisearch/components/generic-modal.tsx index 50c69638..70924109 100644 --- a/starters/shopify-meilisearch/components/GenericModal/GenericModal.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Icons/ArrowIcon.tsx b/starters/shopify-meilisearch/components/icons/arrow-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/ArrowIcon.tsx rename to starters/shopify-meilisearch/components/icons/arrow-icon.tsx diff --git a/starters/shopify-meilisearch/components/Icons/CaretSortIcon.tsx b/starters/shopify-meilisearch/components/icons/caret-sort-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/CaretSortIcon.tsx rename to starters/shopify-meilisearch/components/icons/caret-sort-icon.tsx diff --git a/starters/shopify-meilisearch/components/Icons/CheckIcon.tsx b/starters/shopify-meilisearch/components/icons/check-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/CheckIcon.tsx rename to starters/shopify-meilisearch/components/icons/check-icon.tsx diff --git a/starters/shopify-meilisearch/components/Icons/ChevronIcon.tsx b/starters/shopify-meilisearch/components/icons/chevron-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/ChevronIcon.tsx rename to starters/shopify-meilisearch/components/icons/chevron-icon.tsx diff --git a/starters/shopify-meilisearch/components/Icons/CloseIcon.tsx b/starters/shopify-meilisearch/components/icons/close-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/CloseIcon.tsx rename to starters/shopify-meilisearch/components/icons/close-icon.tsx diff --git a/starters/shopify-meilisearch/components/Icons/FavoritesIcon.tsx b/starters/shopify-meilisearch/components/icons/favorites-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/FavoritesIcon.tsx rename to starters/shopify-meilisearch/components/icons/favorites-icon.tsx diff --git a/starters/shopify-meilisearch/components/Icons/FiltersIcon.tsx b/starters/shopify-meilisearch/components/icons/filters-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/FiltersIcon.tsx rename to starters/shopify-meilisearch/components/icons/filters-icon.tsx diff --git a/starters/shopify-meilisearch/components/Icons/HeartIcon.tsx b/starters/shopify-meilisearch/components/icons/heart-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/HeartIcon.tsx rename to starters/shopify-meilisearch/components/icons/heart-icon.tsx diff --git a/starters/shopify-meilisearch/components/Icons/RobotIcon.tsx b/starters/shopify-meilisearch/components/icons/robot-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/RobotIcon.tsx rename to starters/shopify-meilisearch/components/icons/robot-icon.tsx diff --git a/starters/shopify-meilisearch/components/Icons/SearchIcon.tsx b/starters/shopify-meilisearch/components/icons/search-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/SearchIcon.tsx rename to starters/shopify-meilisearch/components/icons/search-icon.tsx diff --git a/starters/shopify-meilisearch/components/Icons/StarIcon.tsx b/starters/shopify-meilisearch/components/icons/star-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/StarIcon.tsx rename to starters/shopify-meilisearch/components/icons/star-icon.tsx diff --git a/starters/shopify-meilisearch/components/Icons/ThinSearchIcon.tsx b/starters/shopify-meilisearch/components/icons/thin-search-icon.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Icons/ThinSearchIcon.tsx rename to starters/shopify-meilisearch/components/icons/thin-search-icon.tsx diff --git a/starters/shopify-meilisearch/components/LoadingDots/LoadingDots.tsx b/starters/shopify-meilisearch/components/loading-dots.tsx similarity index 100% rename from starters/shopify-meilisearch/components/LoadingDots/LoadingDots.tsx rename to starters/shopify-meilisearch/components/loading-dots.tsx diff --git a/starters/shopify-meilisearch/components/Logo/Logo.tsx b/starters/shopify-meilisearch/components/logo.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Logo/Logo.tsx rename to starters/shopify-meilisearch/components/logo.tsx diff --git a/starters/shopify-meilisearch/components/Modals/LoginModal.tsx b/starters/shopify-meilisearch/components/modals/login-modal.tsx similarity index 88% rename from starters/shopify-meilisearch/components/Modals/LoginModal.tsx rename to starters/shopify-meilisearch/components/modals/login-modal.tsx index e53e35bf..d7017cd1 100644 --- a/starters/shopify-meilisearch/components/Modals/LoginModal.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Modals/Modals.tsx b/starters/shopify-meilisearch/components/modals/modals.tsx similarity index 64% rename from starters/shopify-meilisearch/components/Modals/Modals.tsx rename to starters/shopify-meilisearch/components/modals/modals.tsx index 2ee7b712..1b5de009 100644 --- a/starters/shopify-meilisearch/components/Modals/Modals.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Modals/ReviewModal.tsx b/starters/shopify-meilisearch/components/modals/review-modal.tsx similarity index 93% rename from starters/shopify-meilisearch/components/Modals/ReviewModal.tsx rename to starters/shopify-meilisearch/components/modals/review-modal.tsx index cb5cf169..e0dc2c8d 100644 --- a/starters/shopify-meilisearch/components/Modals/ReviewModal.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Modals/SearchModal.tsx b/starters/shopify-meilisearch/components/modals/search-modal.tsx similarity index 91% rename from starters/shopify-meilisearch/components/Modals/SearchModal.tsx rename to starters/shopify-meilisearch/components/modals/search-modal.tsx index ee9bb9be..f82cb48f 100644 --- a/starters/shopify-meilisearch/components/Modals/SearchModal.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Modals/SignupModal.tsx b/starters/shopify-meilisearch/components/modals/signup-modal.tsx similarity index 88% rename from starters/shopify-meilisearch/components/Modals/SignupModal.tsx rename to starters/shopify-meilisearch/components/modals/signup-modal.tsx index cd91858a..9fad8759 100644 --- a/starters/shopify-meilisearch/components/Modals/SignupModal.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/NavigationBar/Autocomplete.tsx b/starters/shopify-meilisearch/components/navigation-bar/autocomplete.tsx similarity index 91% rename from starters/shopify-meilisearch/components/NavigationBar/Autocomplete.tsx rename to starters/shopify-meilisearch/components/navigation-bar/autocomplete.tsx index acb49b04..b1388e16 100644 --- a/starters/shopify-meilisearch/components/NavigationBar/Autocomplete.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/NavigationBar/Cart.tsx b/starters/shopify-meilisearch/components/navigation-bar/cart.tsx similarity index 92% rename from starters/shopify-meilisearch/components/NavigationBar/Cart.tsx rename to starters/shopify-meilisearch/components/navigation-bar/cart.tsx index 565cad06..10b0353b 100644 --- a/starters/shopify-meilisearch/components/NavigationBar/Cart.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/NavigationBar/Favorites.tsx b/starters/shopify-meilisearch/components/navigation-bar/favorites.tsx similarity index 88% rename from starters/shopify-meilisearch/components/NavigationBar/Favorites.tsx rename to starters/shopify-meilisearch/components/navigation-bar/favorites.tsx index 18ddc3a2..f30b3642 100644 --- a/starters/shopify-meilisearch/components/NavigationBar/Favorites.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/NavigationBar/mobileInlineScript.ts b/starters/shopify-meilisearch/components/navigation-bar/mobile-inline-script.ts similarity index 100% rename from starters/shopify-meilisearch/components/NavigationBar/mobileInlineScript.ts rename to starters/shopify-meilisearch/components/navigation-bar/mobile-inline-script.ts diff --git a/starters/shopify-meilisearch/components/NavigationBar/NavigationBar.tsx b/starters/shopify-meilisearch/components/navigation-bar/navigation-bar.tsx similarity index 85% rename from starters/shopify-meilisearch/components/NavigationBar/NavigationBar.tsx rename to starters/shopify-meilisearch/components/navigation-bar/navigation-bar.tsx index 1d58577e..566c25c7 100644 --- a/starters/shopify-meilisearch/components/NavigationBar/NavigationBar.tsx +++ b/starters/shopify-meilisearch/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 { 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-meilisearch/components/NavigationBar/NavigationItem.tsx b/starters/shopify-meilisearch/components/navigation-bar/navigation-item.tsx similarity index 91% rename from starters/shopify-meilisearch/components/NavigationBar/NavigationItem.tsx rename to starters/shopify-meilisearch/components/navigation-bar/navigation-item.tsx index 4ea0bb4f..3c24086c 100644 --- a/starters/shopify-meilisearch/components/NavigationBar/NavigationItem.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/NavigationBar/OpenCartButton.tsx b/starters/shopify-meilisearch/components/navigation-bar/open-cart-button.tsx similarity index 84% rename from starters/shopify-meilisearch/components/NavigationBar/OpenCartButton.tsx rename to starters/shopify-meilisearch/components/navigation-bar/open-cart-button.tsx index 3862c37f..e43e145d 100644 --- a/starters/shopify-meilisearch/components/NavigationBar/OpenCartButton.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/NavigationBar/SearchButton.tsx b/starters/shopify-meilisearch/components/navigation-bar/search-button.tsx similarity index 66% rename from starters/shopify-meilisearch/components/NavigationBar/SearchButton.tsx rename to starters/shopify-meilisearch/components/navigation-bar/search-button.tsx index 762de45e..04d910ef 100644 --- a/starters/shopify-meilisearch/components/NavigationBar/SearchButton.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/NavigationBar/types.ts b/starters/shopify-meilisearch/components/navigation-bar/types.ts similarity index 100% rename from starters/shopify-meilisearch/components/NavigationBar/types.ts rename to starters/shopify-meilisearch/components/navigation-bar/types.ts diff --git a/starters/shopify-meilisearch/components/NavigationBar/variants/ImageGridVariant.tsx b/starters/shopify-meilisearch/components/navigation-bar/variants/image-grid.tsx similarity index 100% rename from starters/shopify-meilisearch/components/NavigationBar/variants/ImageGridVariant.tsx rename to starters/shopify-meilisearch/components/navigation-bar/variants/image-grid.tsx diff --git a/starters/shopify-meilisearch/components/NavigationBar/variants/TextGridVariant.tsx b/starters/shopify-meilisearch/components/navigation-bar/variants/text-grid.tsx similarity index 100% rename from starters/shopify-meilisearch/components/NavigationBar/variants/TextGridVariant.tsx rename to starters/shopify-meilisearch/components/navigation-bar/variants/text-grid.tsx diff --git a/starters/shopify-meilisearch/components/NavigationBar/variants/TextImageGridVariant.tsx b/starters/shopify-meilisearch/components/navigation-bar/variants/text-image-grid.tsx similarity index 100% rename from starters/shopify-meilisearch/components/NavigationBar/variants/TextImageGridVariant.tsx rename to starters/shopify-meilisearch/components/navigation-bar/variants/text-image-grid.tsx diff --git a/starters/shopify-meilisearch/components/ProductCard/ProductCard.tsx b/starters/shopify-meilisearch/components/product-card.tsx similarity index 94% rename from starters/shopify-meilisearch/components/ProductCard/ProductCard.tsx rename to starters/shopify-meilisearch/components/product-card.tsx index 8282e932..66357aae 100644 --- a/starters/shopify-meilisearch/components/ProductCard/ProductCard.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/ProfileMenu/ProfileBar.tsx b/starters/shopify-meilisearch/components/profile-bar.tsx similarity index 91% rename from starters/shopify-meilisearch/components/ProfileMenu/ProfileBar.tsx rename to starters/shopify-meilisearch/components/profile-bar.tsx index 470eff69..ba941754 100644 --- a/starters/shopify-meilisearch/components/ProfileMenu/ProfileBar.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/ProfileMenu/ProfileMenu.tsx b/starters/shopify-meilisearch/components/profile-menu.tsx similarity index 74% rename from starters/shopify-meilisearch/components/ProfileMenu/ProfileMenu.tsx rename to starters/shopify-meilisearch/components/profile-menu.tsx index bfe10b54..a2bc3ab0 100644 --- a/starters/shopify-meilisearch/components/ProfileMenu/ProfileMenu.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/ProductCard/QuickAddButton.tsx b/starters/shopify-meilisearch/components/quick-add-button.tsx similarity index 89% rename from starters/shopify-meilisearch/components/ProductCard/QuickAddButton.tsx rename to starters/shopify-meilisearch/components/quick-add-button.tsx index 3ca1ab87..f8969958 100644 --- a/starters/shopify-meilisearch/components/ProductCard/QuickAddButton.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/ProductCard/QuickAdd.tsx b/starters/shopify-meilisearch/components/quick-add.tsx similarity index 91% rename from starters/shopify-meilisearch/components/ProductCard/QuickAdd.tsx rename to starters/shopify-meilisearch/components/quick-add.tsx index 6423b047..9ba5ccb7 100644 --- a/starters/shopify-meilisearch/components/ProductCard/QuickAdd.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Spinner/Spinner.tsx b/starters/shopify-meilisearch/components/spinner.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Spinner/Spinner.tsx rename to starters/shopify-meilisearch/components/spinner.tsx diff --git a/starters/shopify-meilisearch/components/Accordion/Accordion.tsx b/starters/shopify-meilisearch/components/ui/accordion.tsx similarity index 97% rename from starters/shopify-meilisearch/components/Accordion/Accordion.tsx rename to starters/shopify-meilisearch/components/ui/accordion.tsx index 43021f69..10bd6de7 100644 --- a/starters/shopify-meilisearch/components/Accordion/Accordion.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Alert/Alert.tsx b/starters/shopify-meilisearch/components/ui/alert.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Alert/Alert.tsx rename to starters/shopify-meilisearch/components/ui/alert.tsx diff --git a/starters/shopify-meilisearch/components/Badge/Badge.tsx b/starters/shopify-meilisearch/components/ui/badge.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Badge/Badge.tsx rename to starters/shopify-meilisearch/components/ui/badge.tsx diff --git a/starters/shopify-meilisearch/components/Breadcrumb/Breadcrumb.tsx b/starters/shopify-meilisearch/components/ui/breadcrumb.tsx similarity index 97% rename from starters/shopify-meilisearch/components/Breadcrumb/Breadcrumb.tsx rename to starters/shopify-meilisearch/components/ui/breadcrumb.tsx index 65dd6d33..4dc33767 100644 --- a/starters/shopify-meilisearch/components/Breadcrumb/Breadcrumb.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Button/Button.tsx b/starters/shopify-meilisearch/components/ui/button-old.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Button/Button.tsx rename to starters/shopify-meilisearch/components/ui/button-old.tsx diff --git a/starters/shopify-meilisearch/components/Button/ButtonNew.tsx b/starters/shopify-meilisearch/components/ui/button.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Button/ButtonNew.tsx rename to starters/shopify-meilisearch/components/ui/button.tsx diff --git a/starters/shopify-meilisearch/components/Card/Card.tsx b/starters/shopify-meilisearch/components/ui/card.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Card/Card.tsx rename to starters/shopify-meilisearch/components/ui/card.tsx diff --git a/starters/shopify-meilisearch/components/Carousel/Carousel.tsx b/starters/shopify-meilisearch/components/ui/carousel.tsx similarity index 98% rename from starters/shopify-meilisearch/components/Carousel/Carousel.tsx rename to starters/shopify-meilisearch/components/ui/carousel.tsx index b88b5298..e568fdea 100644 --- a/starters/shopify-meilisearch/components/Carousel/Carousel.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Checkbox/Checkbox.tsx b/starters/shopify-meilisearch/components/ui/checkbox.tsx similarity index 95% rename from starters/shopify-meilisearch/components/Checkbox/Checkbox.tsx rename to starters/shopify-meilisearch/components/ui/checkbox.tsx index cd582bd5..5c692dc5 100644 --- a/starters/shopify-meilisearch/components/Checkbox/Checkbox.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Dialog/Dialog.tsx b/starters/shopify-meilisearch/components/ui/dialog.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Dialog/Dialog.tsx rename to starters/shopify-meilisearch/components/ui/dialog.tsx diff --git a/starters/shopify-meilisearch/components/DropdownMenu/DropdownMenu.tsx b/starters/shopify-meilisearch/components/ui/dropdown-menu.tsx similarity index 100% rename from starters/shopify-meilisearch/components/DropdownMenu/DropdownMenu.tsx rename to starters/shopify-meilisearch/components/ui/dropdown-menu.tsx diff --git a/starters/shopify-meilisearch/components/Form/Form.tsx b/starters/shopify-meilisearch/components/ui/form.tsx similarity index 98% rename from starters/shopify-meilisearch/components/Form/Form.tsx rename to starters/shopify-meilisearch/components/ui/form.tsx index 300536d8..0c8fd818 100644 --- a/starters/shopify-meilisearch/components/Form/Form.tsx +++ b/starters/shopify-meilisearch/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-meilisearch/components/Input/Input.tsx b/starters/shopify-meilisearch/components/ui/input.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Input/Input.tsx rename to starters/shopify-meilisearch/components/ui/input.tsx diff --git a/starters/shopify-meilisearch/components/Label/Label.tsx b/starters/shopify-meilisearch/components/ui/label.tsx similarity index 100% rename from starters/shopify-meilisearch/components/Label/Label.tsx rename to starters/shopify-meilisearch/components/ui/label.tsx diff --git a/starters/shopify-meilisearch/components/Pagination/Pagination.tsx b/starters/shopify-meilisearch/components/ui/pagination.tsx similarity index 96% rename from starters/shopify-meilisearch/components/Pagination/Pagination.tsx rename to starters/shopify-meilisearch/components/ui/pagination.tsx index 9ec50e3c..9d3ff376 100644 --- a/starters/shopify-meilisearch/components/Pagination/Pagination.tsx +++ b/starters/shopify-meilisearch/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">) => (