Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

perf(storefront)!: Next 16 with Cache Components, server-rendered listings and cached catalog reads (#1713)

Viktor Holik1b33ff3b3ea7
diff --git a/apps/storefront/next.config.ts b/apps/storefront/next.config.ts
index ac5d02f31..f08d08718 100644
--- a/apps/storefront/next.config.ts
+++ b/apps/storefront/next.config.ts
@@ -1,6 +1,8 @@
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
+ cacheComponents: true,
+ partialPrefetching: true,
output: "standalone",
trailingSlash: false,
reactStrictMode: true,
@@ -10,6 +12,8 @@ const nextConfig: NextConfig = {
}
},
images: {
+ // The local Medusa backend serves uploads from localhost, which Next 16 blocks by default.
+ dangerouslyAllowLocalIP: process.env.NODE_ENV !== 'production',
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
diff --git a/apps/storefront/package.json b/apps/storefront/package.json
index 7318e6e4e..ac99eb9fd 100644
--- a/apps/storefront/package.json
+++ b/apps/storefront/package.json
@@ -6,7 +6,7 @@
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
- "lint": "next lint"
+ "lint": "eslint ."
},
"dependencies": {
"@headlessui/react": "^2.2.1",
@@ -28,7 +28,7 @@
"i18next-browser-languagedetector": "^8.1.0",
"js-cookie": "^3.0.5",
"lodash": "^4.17.21",
- "next": "15.5.24",
+ "next": "16.4.2",
"react": "^19.2.1",
"react-country-flag": "^3.1.0",
"react-dom": "^19.0.0",
@@ -58,7 +58,7 @@
"@types/react-dom": "^19",
"@types/sanitize-html": "^2.16.1",
"eslint": "^9",
- "eslint-config-next": "15.5.7",
+ "eslint-config-next": "16.4.2",
"eslint-plugin-storybook": "^0.11.2",
"postcss": "^8",
"prettier": "^3.5.3",
diff --git a/apps/storefront/src/app/[locale]/(auth)/layout.tsx b/apps/storefront/src/app/[locale]/(auth)/layout.tsx
index 83a82e497..a17ae4fc9 100644
--- a/apps/storefront/src/app/[locale]/(auth)/layout.tsx
+++ b/apps/storefront/src/app/[locale]/(auth)/layout.tsx
@@ -1,27 +1,12 @@
-import { Footer, Header } from "@/components/organisms"
-import { checkRegion } from "@/lib/helpers/check-region"
-import { redirect } from "next/navigation"
-
-export default async function AuthLayout({
- children,
- params,
-}: Readonly<{
- children: React.ReactNode
- params: Promise<{ locale: string }>
-}>) {
- const { locale } = await params
- const regionCheck = await checkRegion(locale)
-
- if (!regionCheck) {
- return redirect("/")
- }
+import { Footer } from '@/components/organisms/Footer/Footer';
+import { Header } from '@/components/organisms/Header/Header';
+export default function AuthLayout({ children }: { children: React.ReactNode }) {
return (
<>
- <Header locale={locale} />
+ <Header />
{children}
<Footer />
</>
- )
+ );
}
-
diff --git a/apps/storefront/src/app/[locale]/(auth)/login/page.tsx b/apps/storefront/src/app/[locale]/(auth)/login/page.tsx
index 7c84c4999..e6e6f4f21 100644
--- a/apps/storefront/src/app/[locale]/(auth)/login/page.tsx
+++ b/apps/storefront/src/app/[locale]/(auth)/login/page.tsx
@@ -1,4 +1,6 @@
-import { LoginForm } from "@/components/molecules"
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
+import { LoginForm } from '@/components/molecules/LoginForm/LoginForm';
import { retrieveCustomer } from "@/lib/data/customer"
import type { Metadata } from "next"
import { redirect } from "next/navigation"
@@ -8,7 +10,15 @@ export const metadata: Metadata = {
robots: { index: false, follow: false },
}
-export default async function LoginPage() {
+export default function LoginPage() {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <LoginPageContent />
+ </Suspense>
+ )
+}
+
+async function LoginPageContent() {
const user = await retrieveCustomer()
if (user) {
diff --git a/apps/storefront/src/app/[locale]/(auth)/register/page.tsx b/apps/storefront/src/app/[locale]/(auth)/register/page.tsx
index ebc5c03e6..a14a917c4 100644
--- a/apps/storefront/src/app/[locale]/(auth)/register/page.tsx
+++ b/apps/storefront/src/app/[locale]/(auth)/register/page.tsx
@@ -1,4 +1,6 @@
-import { RegisterForm } from "@/components/molecules"
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
+import { RegisterForm } from '@/components/molecules/RegisterForm/RegisterForm';
import { retrieveCustomer } from "@/lib/data/customer"
import type { Metadata } from "next"
import { redirect } from "next/navigation"
@@ -8,7 +10,15 @@ export const metadata: Metadata = {
robots: { index: false, follow: false },
}
-export default async function RegisterPage() {
+export default function RegisterPage() {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <RegisterPageContent />
+ </Suspense>
+ )
+}
+
+async function RegisterPageContent() {
const user = await retrieveCustomer()
if (user) {
diff --git a/apps/storefront/src/app/[locale]/(checkout)/checkout/page.tsx b/apps/storefront/src/app/[locale]/(checkout)/checkout/page.tsx
index 43105818e..cc07a8c6e 100644
--- a/apps/storefront/src/app/[locale]/(checkout)/checkout/page.tsx
+++ b/apps/storefront/src/app/[locale]/(checkout)/checkout/page.tsx
@@ -19,7 +19,7 @@ export const metadata: Metadata = {
robots: { index: false, follow: false }
};
-export default async function CheckoutPage({}) {
+export default function CheckoutPage() {
return (
<Suspense
fallback={<div className="container flex items-center justify-center" data-testid="checkout-page-loading">Loading...</div>}
@@ -29,7 +29,7 @@ export default async function CheckoutPage({}) {
);
}
-async function CheckoutPageContent({}) {
+async function CheckoutPageContent() {
const cart = await retrieveCart();
if (!cart) {
diff --git a/apps/storefront/src/app/[locale]/(checkout)/layout.tsx b/apps/storefront/src/app/[locale]/(checkout)/layout.tsx
index d4a5ac8ce..14d0efc73 100644
--- a/apps/storefront/src/app/[locale]/(checkout)/layout.tsx
+++ b/apps/storefront/src/app/[locale]/(checkout)/layout.tsx
@@ -1,4 +1,4 @@
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { CollapseIcon } from "@/icons"
import Image from "next/image"
diff --git a/apps/storefront/src/app/[locale]/(main)/cart/page.tsx b/apps/storefront/src/app/[locale]/(main)/cart/page.tsx
index 0bc751dff..a50581336 100644
--- a/apps/storefront/src/app/[locale]/(main)/cart/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/cart/page.tsx
@@ -1,4 +1,4 @@
-import { Cart } from '@/components/sections';
+import { Cart } from '@/components/sections/Cart/Cart';
import { Metadata } from 'next';
import { Suspense } from 'react';
diff --git a/apps/storefront/src/app/[locale]/(main)/categories/[category]/page.tsx b/apps/storefront/src/app/[locale]/(main)/categories/[category]/page.tsx
index cad41b012..1524e669f 100644
--- a/apps/storefront/src/app/[locale]/(main)/categories/[category]/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/categories/[category]/page.tsx
@@ -3,20 +3,18 @@ import { getCategoryByHandle, collectCategorySubtreeIds } from "@/lib/data/categ
import { Suspense } from "react"
import type { Metadata } from "next"
-import { Breadcrumbs } from "@/components/atoms"
-import { SearchProductsListing, ProductListing } from "@/components/sections"
+import { getBaseUrl } from "@/lib/helpers/base-url"
+import { Breadcrumbs } from '@/components/atoms/Breadcrumbs/Breadcrumbs';
+import { SearchProductsListing } from '@/components/sections/ProductListing/SearchProductsListing';
import { notFound } from "next/navigation"
-import isBot from "@/lib/helpers/isBot"
-import { headers } from "next/headers"
-import Script from "next/script"
import { listRegions } from "@/lib/data/regions"
-import { listProducts } from "@/lib/data/products"
+import { searchProducts } from "@/lib/data/products"
+import { PRODUCT_LIMIT } from "@/const"
import {
buildHreflangAlternates,
getStorefrontLocales,
} from "@/lib/helpers/hreflang"
-export const revalidate = 60
export async function generateMetadata({
params,
@@ -24,10 +22,7 @@ export async function generateMetadata({
params: Promise<{ category: string; locale: string }>
}): Promise<Metadata> {
const { category: categoryHandle, locale } = await params
- const headersList = await headers()
- const host = headersList.get("host")
- const protocol = headersList.get("x-forwarded-proto") || "https"
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || `${protocol}://${host}`
+ const baseUrl = getBaseUrl()
const cat = await getCategoryByHandle(categoryHandle)
if (!cat) {
@@ -71,14 +66,29 @@ export async function generateMetadata({
}
}
+export default function CategoryPage({
+ params,
+ searchParams,
+}: PageProps<"/[locale]/categories/[category]">) {
+ return (
+ <main className="container">
+ <Suspense
+ fallback={
+ <div aria-busy="true" data-testid="category-page-loading">
+ <ProductListingSkeleton />
+ </div>
+ }
+ >
+ <Category params={params} searchParams={searchParams} />
+ </Suspense>
+ </main>
+ )
+}
+
async function Category({
params,
-}: {
- params: Promise<{
- category: string
- locale: string
- }>
-}) {
+ searchParams,
+}: Pick<PageProps<"/[locale]/categories/[category]">, "params" | "searchParams">) {
const { category: categoryHandle, locale } = await params
const category = await getCategoryByHandle(categoryHandle)
@@ -90,8 +100,6 @@ async function Category({
// Include the whole category subtree so a parent department page lists every
// product in its sub-categories, not just products attached to the parent.
const categoryIds = collectCategorySubtreeIds(category)
- const ua = (await headers()).get("user-agent") || ""
- const bot = isBot(ua)
const breadcrumbsItems = [
{
@@ -100,16 +108,11 @@ async function Category({
},
]
- const headersList = await headers()
- const host = headersList.get("host")
- const protocol = headersList.get("x-forwarded-proto") || "https"
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || `${protocol}://${host}`
- const {
- response: { products: jsonLdProducts },
- } = await listProducts({
+ const baseUrl = getBaseUrl()
+ const { products: jsonLdProducts } = await searchProducts({
countryCode: locale,
- queryParams: { limit: 8, order: "created_at", fields: "id,title,handle" },
category_id: categoryIds,
+ limit: PRODUCT_LIMIT,
})
const itemList = jsonLdProducts.slice(0, 8).map((p, idx) => ({
@@ -120,8 +123,8 @@ async function Category({
}))
return (
- <main className="container">
- <Script
+ <>
+ <script
id="ld-breadcrumbs-category"
type="application/ld+json"
dangerouslySetInnerHTML={{
@@ -139,7 +142,7 @@ async function Category({
}),
}}
/>
- <Script
+ <script
id="ld-itemlist-category"
type="application/ld+json"
dangerouslySetInnerHTML={{
@@ -156,15 +159,11 @@ async function Category({
<h1 className="heading-xl uppercase">{category.name}</h1>
- <Suspense fallback={<div data-testid="category-page-loading"><ProductListingSkeleton /></div>}>
- {bot ? (
- <ProductListing category_id={categoryIds} showSidebar locale={locale} />
- ) : (
- <SearchProductsListing category_id={categoryIds} locale={locale} />
- )}
- </Suspense>
- </main>
+ <SearchProductsListing
+ category_id={categoryIds}
+ locale={locale}
+ searchParams={searchParams}
+ />
+ </>
)
}
-
-export default Category
diff --git a/apps/storefront/src/app/[locale]/(main)/categories/page.tsx b/apps/storefront/src/app/[locale]/(main)/categories/page.tsx
index 49df47564..7900449b0 100644
--- a/apps/storefront/src/app/[locale]/(main)/categories/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/categories/page.tsx
@@ -1,20 +1,15 @@
-import { ProductListingSkeleton } from "@/components/organisms/ProductListingSkeleton/ProductListingSkeleton"
-import { Suspense } from "react"
-
-import { Breadcrumbs } from "@/components/atoms"
-import { SearchProductsListing, ProductListing } from "@/components/sections"
-import isBot from "@/lib/helpers/isBot"
-import { headers } from "next/headers"
+import { Breadcrumbs } from '@/components/atoms/Breadcrumbs/Breadcrumbs';
+import { SearchProductsListing } from '@/components/sections/ProductListing/SearchProductsListing';
import type { Metadata } from "next"
-import Script from "next/script"
+import { getBaseUrl } from "@/lib/helpers/base-url"
import { listRegions } from "@/lib/data/regions"
-import { listProducts } from "@/lib/data/products"
+import { searchProducts } from "@/lib/data/products"
+import { PRODUCT_LIMIT } from "@/const"
import {
buildHreflangAlternates,
getStorefrontLocales,
} from "@/lib/helpers/hreflang"
-export const revalidate = 60
export async function generateMetadata({
params,
@@ -22,10 +17,7 @@ export async function generateMetadata({
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
- const headersList = await headers()
- const host = headersList.get("host")
- const protocol = headersList.get("x-forwarded-proto") || "https"
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || `${protocol}://${host}`
+ const baseUrl = getBaseUrl()
let locales: string[] = []
try {
@@ -64,16 +56,12 @@ export async function generateMetadata({
}
}
-async function AllCategories({
+export default async function AllCategories({
params,
-}: {
- params: Promise<{ locale: string }>
-}) {
+ searchParams,
+}: PageProps<"/[locale]/categories">) {
const { locale } = await params
- const ua = (await headers()).get("user-agent") || ""
- const bot = isBot(ua)
-
const breadcrumbsItems = [
{
path: "/",
@@ -81,15 +69,10 @@ async function AllCategories({
},
]
- const headersList = await headers()
- const host = headersList.get("host")
- const protocol = headersList.get("x-forwarded-proto") || "https"
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || `${protocol}://${host}`
- const {
- response: { products: jsonLdProducts },
- } = await listProducts({
+ const baseUrl = getBaseUrl()
+ const { products: jsonLdProducts } = await searchProducts({
countryCode: locale,
- queryParams: { limit: 8, order: "created_at", fields: "id,title,handle" },
+ limit: PRODUCT_LIMIT,
})
const itemList = jsonLdProducts.slice(0, 8).map((p, idx) => ({
@@ -101,7 +84,7 @@ async function AllCategories({
return (
<main className="container">
- <Script
+ <script
id="ld-breadcrumbs-categories"
type="application/ld+json"
dangerouslySetInnerHTML={{
@@ -119,7 +102,7 @@ async function AllCategories({
}),
}}
/>
- <Script
+ <script
id="ld-itemlist-categories"
type="application/ld+json"
dangerouslySetInnerHTML={{
@@ -136,15 +119,7 @@ async function AllCategories({
<h1 className="heading-xl uppercase">All Products</h1>
- <Suspense fallback={<div data-testid="all-categories-page-loading"><ProductListingSkeleton /></div>}>
- {bot ? (
- <ProductListing showSidebar locale={locale} />
- ) : (
- <SearchProductsListing locale={locale} />
- )}
- </Suspense>
+ <SearchProductsListing locale={locale} searchParams={searchParams} />
</main>
)
}
-
-export default AllCategories
diff --git a/apps/storefront/src/app/[locale]/(main)/collections/[handle]/page.tsx b/apps/storefront/src/app/[locale]/(main)/collections/[handle]/page.tsx
index 413e6a4dd..a6f54191c 100644
--- a/apps/storefront/src/app/[locale]/(main)/collections/[handle]/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/collections/[handle]/page.tsx
@@ -1,16 +1,15 @@
-import NotFound from "@/app/not-found"
-import { Breadcrumbs } from "@/components/atoms"
+import { Breadcrumbs } from '@/components/atoms/Breadcrumbs/Breadcrumbs';
import { ProductListingSkeleton } from "@/components/organisms/ProductListingSkeleton/ProductListingSkeleton"
-import { SearchProductsListing, ProductListing } from "@/components/sections"
+import { SearchProductsListing } from '@/components/sections/ProductListing/SearchProductsListing';
import { getCollectionByHandle } from "@/lib/data/collections"
import { listRegions } from "@/lib/data/regions"
import {
buildHreflangAlternates,
getStorefrontLocales,
} from "@/lib/helpers/hreflang"
-import isBot from "@/lib/helpers/isBot"
import type { Metadata } from "next"
-import { headers } from "next/headers"
+import { getBaseUrl } from "@/lib/helpers/base-url"
+import { notFound } from "next/navigation"
import { Suspense } from "react"
export async function generateMetadata({
@@ -25,10 +24,7 @@ export async function generateMetadata({
return {}
}
- const headersList = await headers()
- const host = headersList.get("host")
- const protocol = headersList.get("x-forwarded-proto") || "https"
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || `${protocol}://${host}`
+ const baseUrl = getBaseUrl()
let locales: string[] = []
try {
@@ -67,17 +63,34 @@ export async function generateMetadata({
}
}
-const SingleCollectionsPage = async ({
+export default function SingleCollectionsPage({
params,
-}: {
- params: Promise<{ handle: string; locale: string }>
-}) => {
+ searchParams,
+}: PageProps<"/[locale]/collections/[handle]">) {
+ return (
+ <main className="container">
+ <Suspense
+ fallback={
+ <div aria-busy="true" data-testid="collection-page-loading">
+ <ProductListingSkeleton />
+ </div>
+ }
+ >
+ <Collection params={params} searchParams={searchParams} />
+ </Suspense>
+ </main>
+ )
+}
+
+async function Collection({
+ params,
+ searchParams,
+}: Pick<PageProps<"/[locale]/collections/[handle]">, "params" | "searchParams">) {
const { handle, locale } = await params
- const bot = isBot(navigator.userAgent)
const collection = await getCollectionByHandle(handle)
- if (!collection) return <NotFound />
+ if (!collection) notFound()
const breadcrumbsItems = [
{
@@ -87,22 +100,18 @@ const SingleCollectionsPage = async ({
]
return (
- <main className="container">
+ <>
<div className="hidden md:block mb-2">
<Breadcrumbs items={breadcrumbsItems} />
</div>
<h1 className="heading-xl uppercase">{collection.title}</h1>
- <Suspense fallback={<div data-testid="collection-page-loading"><ProductListingSkeleton /></div>}>
- {bot ? (
- <ProductListing collection_id={collection.id} showSidebar />
- ) : (
- <SearchProductsListing collection_id={collection.id} locale={locale} />
- )}
- </Suspense>
- </main>
+ <SearchProductsListing
+ collection_id={collection.id}
+ locale={locale}
+ searchParams={searchParams}
+ />
+ </>
)
}
-
-export default SingleCollectionsPage
diff --git a/apps/storefront/src/app/[locale]/(main)/layout.tsx b/apps/storefront/src/app/[locale]/(main)/layout.tsx
index 4d909f938..e5939dd71 100644
--- a/apps/storefront/src/app/[locale]/(main)/layout.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/layout.tsx
@@ -1,47 +1,12 @@
-import { redirect } from 'next/navigation';
-
-import { Footer, Header } from '@/components/organisms';
-import { TalkJsProvider } from '@/components/providers';
-import { retrieveCustomer } from '@/lib/data/customer';
-import { checkRegion } from '@/lib/helpers/check-region';
-
-export default async function RootLayout({
- children,
- params
-}: Readonly<{
- children: React.ReactNode;
- params: Promise<{ locale: string }>;
-}>) {
- const APP_ID = process.env.NEXT_PUBLIC_TALKJS_APP_ID;
- const { locale } = await params;
-
- const [user, regionCheck] = await Promise.all([retrieveCustomer(), checkRegion(locale)]);
-
- if (!regionCheck) {
- return redirect('/');
- }
-
- if (!APP_ID || !user || !user.id || !user.email)
- return (
- <>
- <Header locale={locale} />
- {children}
- <Footer />
- </>
- );
-
- const userName = [user.first_name, user.last_name].filter(Boolean).join(' ') || 'User';
+import { Footer } from '@/components/organisms/Footer/Footer';
+import { Header } from '@/components/organisms/Header/Header';
+export default function MainLayout({ children }: { children: React.ReactNode }) {
return (
- <TalkJsProvider
- appId={APP_ID}
- userId={user.id}
- userName={userName}
- userEmail={user.email}
- >
- <Header locale={locale} />
+ <>
+ <Header />
{children}
<Footer />
- </TalkJsProvider>
+ </>
);
}
diff --git a/apps/storefront/src/app/[locale]/(main)/order/[id]/confirmed/page.tsx b/apps/storefront/src/app/[locale]/(main)/order/[id]/confirmed/page.tsx
index f6d8ad38d..865073b10 100644
--- a/apps/storefront/src/app/[locale]/(main)/order/[id]/confirmed/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/order/[id]/confirmed/page.tsx
@@ -1,3 +1,5 @@
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
import { OrderConfirmedSection } from "@/components/sections/OrderConfirmedSection/OrderConfirmedSection"
import { retrieveOrder } from "@/lib/data/orders"
import { Metadata } from "next"
@@ -11,7 +13,15 @@ export const metadata: Metadata = {
description: "You purchase was successful",
}
-export default async function OrderConfirmedPage(props: Props) {
+export default function OrderConfirmedPage(props: Props) {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <OrderConfirmedPageContent {...props} />
+ </Suspense>
+ )
+}
+
+async function OrderConfirmedPageContent(props: Props) {
const params = await props.params
const order = await retrieveOrder(params.id).catch(() => null)
diff --git a/apps/storefront/src/app/[locale]/(main)/page.tsx b/apps/storefront/src/app/[locale]/(main)/page.tsx
index 6aa3be41b..e77da4883 100644
--- a/apps/storefront/src/app/[locale]/(main)/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/page.tsx
@@ -1,14 +1,12 @@
-import {
- BannerSection,
- BlogSection,
- Hero,
- HomeCategories,
- HomeProductSection,
- ShopByStyleSection,
-} from "@/components/sections"
+import { BannerSection } from '@/components/sections/BannerSection/BannerSection';
+import { BlogSection } from '@/components/sections/BlogSection/BlogSection';
+import { Hero } from '@/components/sections/Hero/Hero';
+import { HomeCategories } from '@/components/sections/HomeCategories/HomeCategories';
+import { HomeProductSection } from '@/components/sections/HomeProductSection/HomeProductSection';
+import { ShopByStyleSection } from '@/components/sections/ShopByStyle/ShopByStyleSection';
import type { Metadata } from "next"
-import { headers } from "next/headers"
+import { getBaseUrl } from "@/lib/helpers/base-url"
import Script from "next/script"
import { listRegions } from "@/lib/data/regions"
import {
@@ -24,10 +22,7 @@ export async function generateMetadata({
}): Promise<Metadata> {
const { locale } = await params
- const headersList = await headers()
- const host = headersList.get("host")
- const protocol = headersList.get("x-forwarded-proto") || "https"
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || `${protocol}://${host}`
+ const baseUrl = getBaseUrl()
let locales: string[] = []
try {
@@ -104,10 +99,7 @@ export default async function Home({
}) {
const { locale } = await params
- const headersList = await headers()
- const host = headersList.get("host")
- const protocol = headersList.get("x-forwarded-proto") || "https"
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || `${protocol}://${host}`
+ const baseUrl = getBaseUrl()
const siteName =
process.env.NEXT_PUBLIC_SITE_NAME ||
diff --git a/apps/storefront/src/app/[locale]/(main)/products/[handle]/page.tsx b/apps/storefront/src/app/[locale]/(main)/products/[handle]/page.tsx
index a6f5c0115..95ebca0da 100644
--- a/apps/storefront/src/app/[locale]/(main)/products/[handle]/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/products/[handle]/page.tsx
@@ -1,7 +1,9 @@
import { Suspense } from "react"
-import { ProductDetailsPage } from "@/components/sections"
-import { ProductDetailsPageSkeleton } from "@/components/sections/ProductDetailsPage/ProductDetailsPage"
+import {
+ ProductDetailsPage,
+ ProductDetailsPageSkeleton,
+} from "@/components/sections/ProductDetailsPage/ProductDetailsPage"
import { listProducts } from "@/lib/data/products"
import { generateProductMetadata } from "@/lib/helpers/seo"
import type { Metadata } from "next"
@@ -21,18 +23,17 @@ export async function generateMetadata({
return generateProductMetadata(prod, locale)
}
-export default async function ProductPage({
- params,
-}: {
- params: Promise<{ handle: string; locale: string }>
-}) {
- const { handle, locale } = await params
-
+export default function ProductPage({ params }: PageProps<"/[locale]/products/[handle]">) {
return (
<main className="container">
- <Suspense key={handle} fallback={<ProductDetailsPageSkeleton />}>
- <ProductDetailsPage handle={handle} locale={locale} />
+ <Suspense fallback={<ProductDetailsPageSkeleton />}>
+ <ProductContent params={params} />
</Suspense>
</main>
)
}
+
+async function ProductContent({ params }: Pick<PageProps<"/[locale]/products/[handle]">, "params">) {
+ const { handle, locale } = await params
+ return <ProductDetailsPage handle={handle} locale={locale} />
+}
diff --git a/apps/storefront/src/app/[locale]/(main)/sellers/[handle]/page.tsx b/apps/storefront/src/app/[locale]/(main)/sellers/[handle]/page.tsx
index 2d8082934..82009cbe0 100644
--- a/apps/storefront/src/app/[locale]/(main)/sellers/[handle]/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/sellers/[handle]/page.tsx
@@ -1,5 +1,9 @@
-import { SellerTabs } from "@/components/organisms"
-import { SellerPageHeader } from "@/components/sections"
+import { notFound } from "next/navigation"
+import { Suspense } from "react"
+
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
+import { SellerTabs } from '@/components/organisms/SellerTabs/SellerTabs';
+import { SellerPageHeader } from '@/components/sections/SellerPageHeader/SellerPageHeader';
import { retrieveCustomer } from "@/lib/data/customer"
import { listRegions } from "@/lib/data/regions"
import { getSellerByHandle } from "@/lib/data/seller"
@@ -7,9 +11,8 @@ import {
buildHreflangAlternates,
getStorefrontLocales,
} from "@/lib/helpers/hreflang"
-import { SellerDTO } from "@mercurjs/types"
import type { Metadata } from "next"
-import { headers } from "next/headers"
+import { getBaseUrl } from "@/lib/helpers/base-url"
export async function generateMetadata({
params,
@@ -18,15 +21,12 @@ export async function generateMetadata({
}): Promise<Metadata> {
const { handle, locale } = await params
- const seller = (await getSellerByHandle(handle)) as SellerDTO
+ const seller = await getSellerByHandle(handle)
if (!seller) {
return {}
}
- const headersList = await headers()
- const host = headersList.get("host")
- const protocol = headersList.get("x-forwarded-proto") || "https"
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || `${protocol}://${host}`
+ const baseUrl = getBaseUrl()
let locales: string[] = []
try {
@@ -65,37 +65,41 @@ export async function generateMetadata({
}
}
-export default async function SellerPage({
- params,
- searchParams,
-}: {
- params: Promise<{ handle: string; locale: string }>
- searchParams: Promise<{ page?: string }>
-}) {
+export default function SellerPage(props: PageProps<"/[locale]/sellers/[handle]">) {
+ return (
+ <main className="container">
+ <Suspense fallback={<RouteFallback />}>
+ <SellerContent {...props} />
+ </Suspense>
+ </main>
+ )
+}
+
+async function SellerContent({ params, searchParams }: PageProps<"/[locale]/sellers/[handle]">) {
const { handle, locale } = await params
const { page } = await searchParams
- const [seller, user] = (await Promise.all([
+ const [seller, user] = await Promise.all([
getSellerByHandle(handle),
retrieveCustomer(),
- ])) as [SellerDTO, Awaited<ReturnType<typeof retrieveCustomer>>]
-
- const tab = "offers"
+ ])
if (!seller) {
- return null
+ notFound()
}
+ const pageNumber = typeof page === "string" ? parseInt(page, 10) || 1 : 1
+
return (
- <main className="container">
+ <>
<SellerPageHeader header seller={seller} user={user} />
<SellerTabs
- tab={tab}
+ tab="offers"
seller_id={seller.id}
seller_handle={seller.handle}
locale={locale}
- page={page ? parseInt(page, 10) : 1}
+ page={pageNumber}
/>
- </main>
+ </>
)
}
diff --git a/apps/storefront/src/app/[locale]/(main)/user/addresses/page.tsx b/apps/storefront/src/app/[locale]/(main)/user/addresses/page.tsx
index b9eeed3f1..6263fd35d 100644
--- a/apps/storefront/src/app/[locale]/(main)/user/addresses/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/user/addresses/page.tsx
@@ -1,10 +1,20 @@
-import { UserNavigation } from "@/components/molecules"
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
+import { UserNavigation } from '@/components/molecules/UserNavigation/UserNavigation';
import { retrieveCustomer } from "@/lib/data/customer"
import { redirect } from "next/navigation"
-import { Addresses } from "@/components/organisms"
+import { Addresses } from '@/components/organisms/Addressess/Addresses';
import { listRegions } from "@/lib/data/regions"
-export default async function Page() {
+export default function Page() {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <PageContent />
+ </Suspense>
+ )
+}
+
+async function PageContent() {
const user = await retrieveCustomer()
const regions = await listRegions()
diff --git a/apps/storefront/src/app/[locale]/(main)/user/layout.tsx b/apps/storefront/src/app/[locale]/(main)/user/layout.tsx
index e77b3d5bb..6d8f32e05 100644
--- a/apps/storefront/src/app/[locale]/(main)/user/layout.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/user/layout.tsx
@@ -1,7 +1,18 @@
+import { Suspense } from "react"
+
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
+import { CustomerTalkJsProvider } from "@/components/providers/TalkJs/CustomerTalkJsProvider"
+
export default function UserLayout({
children,
}: {
children: React.ReactNode
}) {
- return <div className="-mt-6">{children}</div>
+ return (
+ <div className="-mt-6">
+ <Suspense fallback={<RouteFallback />}>
+ <CustomerTalkJsProvider>{children}</CustomerTalkJsProvider>
+ </Suspense>
+ </div>
+ )
}
diff --git a/apps/storefront/src/app/[locale]/(main)/user/messages/page.tsx b/apps/storefront/src/app/[locale]/(main)/user/messages/page.tsx
index 4ae15fa74..3c911023b 100644
--- a/apps/storefront/src/app/[locale]/(main)/user/messages/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/user/messages/page.tsx
@@ -1,9 +1,19 @@
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
import { LoginForm } from "@/components/molecules/LoginForm/LoginForm"
import { UserNavigation } from "@/components/molecules/UserNavigation/UserNavigation"
import { UserMessagesSection } from "@/components/sections/UserMessagesSection/UserMessagesSection"
import { retrieveCustomer } from "@/lib/data/customer"
-export default async function MessagesPage() {
+export default function MessagesPage() {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <MessagesPageContent />
+ </Suspense>
+ )
+}
+
+async function MessagesPageContent() {
const user = await retrieveCustomer()
if (!user) return <LoginForm />
diff --git a/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/page.tsx b/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/page.tsx
index bc6f5c67f..d3f715f10 100644
--- a/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/page.tsx
@@ -1,6 +1,8 @@
-import { UserNavigation } from "@/components/molecules"
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
+import { UserNavigation } from '@/components/molecules/UserNavigation/UserNavigation';
import { retrieveCustomer } from "@/lib/data/customer"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { ArrowLeftIcon } from "@/icons"
import { redirect } from "next/navigation"
@@ -8,7 +10,17 @@ import { format } from "date-fns"
import { retrieveOrderGroup } from "@/lib/data/orders"
import { OrderDetailsSection } from "@/components/sections/OrderDetailsSection/OrderDetailsSection"
-export default async function UserPage({
+export default function UserPage(props: {
+ params: Promise<{ id: string }>
+}) {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <UserPageContent {...props} />
+ </Suspense>
+ )
+}
+
+async function UserPageContent({
params,
}: {
params: Promise<{ id: string }>
diff --git a/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/request-success/page.tsx b/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/request-success/page.tsx
index 5753ea8aa..830a375e3 100644
--- a/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/request-success/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/request-success/page.tsx
@@ -1,8 +1,20 @@
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
import { Button } from "@/components/atoms/Button/Button"
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { UserNavigation } from "@/components/molecules/UserNavigation/UserNavigation"
-export default async function RequestSuccessPage({
+export default function RequestSuccessPage(props: {
+ params: Promise<{ id: string }>
+}) {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <RequestSuccessPageContent {...props} />
+ </Suspense>
+ )
+}
+
+async function RequestSuccessPageContent({
params,
}: {
params: Promise<{ id: string }>
diff --git a/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/return/page.tsx b/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/return/page.tsx
index 4eb0b9c2d..425f6e73b 100644
--- a/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/return/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/user/orders/[id]/return/page.tsx
@@ -1,3 +1,5 @@
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
import { OrderReturnSection } from "@/components/sections/OrderReturnSection/OrderReturnSection"
import {
retrieveOrder,
@@ -5,7 +7,17 @@ import {
retriveReturnMethods,
} from "@/lib/data/orders"
-export default async function ReturnOrderPage({
+export default function ReturnOrderPage(props: {
+ params: Promise<{ id: string }>
+}) {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <ReturnOrderPageContent {...props} />
+ </Suspense>
+ )
+}
+
+async function ReturnOrderPageContent({
params,
}: {
params: Promise<{ id: string }>
diff --git a/apps/storefront/src/app/[locale]/(main)/user/orders/page.tsx b/apps/storefront/src/app/[locale]/(main)/user/orders/page.tsx
index 3313c7960..f4f0fc4e9 100644
--- a/apps/storefront/src/app/[locale]/(main)/user/orders/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/user/orders/page.tsx
@@ -1,13 +1,27 @@
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
import { isEmpty } from 'lodash';
-import { LoginForm, ParcelAccordion, UserNavigation } from '@/components/molecules';
-import { OrdersPagination } from '@/components/sections';
+import { LoginForm } from '@/components/molecules/LoginForm/LoginForm';
+import { ParcelAccordion } from '@/components/molecules/ParcelAccordion/ParcelAccordion';
+import { UserNavigation } from '@/components/molecules/UserNavigation/UserNavigation';
+import { OrdersPagination } from '@/components/organisms/OrdersPagination/OrdersPagination';
import { retrieveCustomer } from '@/lib/data/customer';
import { listOrders } from '@/lib/data/orders';
const LIMIT = 10;
-export default async function UserPage({
+export default function UserPage(props: {
+ searchParams: Promise<{ page: string }>;
+}) {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <UserPageContent {...props} />
+ </Suspense>
+ )
+}
+
+async function UserPageContent({
searchParams
}: {
searchParams: Promise<{ page: string }>;
diff --git a/apps/storefront/src/app/[locale]/(main)/user/page.tsx b/apps/storefront/src/app/[locale]/(main)/user/page.tsx
index de7aa15d6..bbb54e88f 100644
--- a/apps/storefront/src/app/[locale]/(main)/user/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/user/page.tsx
@@ -1,8 +1,18 @@
-import { UserNavigation } from "@/components/molecules"
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
+import { UserNavigation } from '@/components/molecules/UserNavigation/UserNavigation';
import { retrieveCustomer } from "@/lib/data/customer"
import { redirect } from "next/navigation"
-export default async function UserPage() {
+export default function UserPage() {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <UserPageContent />
+ </Suspense>
+ )
+}
+
+async function UserPageContent() {
const user = await retrieveCustomer()
if (!user) {
diff --git a/apps/storefront/src/app/[locale]/(main)/user/register/page.tsx b/apps/storefront/src/app/[locale]/(main)/user/register/page.tsx
index 5086f95ff..1c7f99515 100644
--- a/apps/storefront/src/app/[locale]/(main)/user/register/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/user/register/page.tsx
@@ -1,8 +1,18 @@
-import { RegisterForm } from "@/components/molecules"
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
+import { RegisterForm } from '@/components/molecules/RegisterForm/RegisterForm';
import { retrieveCustomer } from "@/lib/data/customer"
import { redirect } from "next/navigation"
-export default async function Page() {
+export default function Page() {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <PageContent />
+ </Suspense>
+ )
+}
+
+async function PageContent() {
const user = await retrieveCustomer()
if (user) {
diff --git a/apps/storefront/src/app/[locale]/(main)/user/returns/page.tsx b/apps/storefront/src/app/[locale]/(main)/user/returns/page.tsx
index cdff43787..e582716cb 100644
--- a/apps/storefront/src/app/[locale]/(main)/user/returns/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/user/returns/page.tsx
@@ -1,9 +1,21 @@
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
import { UserNavigation } from '@/components/molecules/UserNavigation/UserNavigation';
import { OrderReturnRequests } from '@/components/sections/OrderReturnRequests/OrderReturnRequests';
import { retrieveCustomer } from '@/lib/data/customer';
import { getReturns, retrieveReturnReasons } from '@/lib/data/orders';
-export default async function ReturnsPage({
+export default function ReturnsPage(props: {
+ searchParams: Promise<{ page: string; return: string }>;
+}) {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <ReturnsPageContent {...props} />
+ </Suspense>
+ )
+}
+
+async function ReturnsPageContent({
searchParams
}: {
searchParams: Promise<{ page: string; return: string }>;
diff --git a/apps/storefront/src/app/[locale]/(main)/user/settings/page.tsx b/apps/storefront/src/app/[locale]/(main)/user/settings/page.tsx
index d50800315..43c2e6eef 100644
--- a/apps/storefront/src/app/[locale]/(main)/user/settings/page.tsx
+++ b/apps/storefront/src/app/[locale]/(main)/user/settings/page.tsx
@@ -1,9 +1,20 @@
-import { LoginForm, ProfileDetails } from "@/components/molecules"
-import { UserNavigation } from "@/components/molecules"
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
+import { LoginForm } from '@/components/molecules/LoginForm/LoginForm';
+import { ProfileDetails } from '@/components/molecules/ProfileDetails/ProfileDetails';
+import { UserNavigation } from '@/components/molecules/UserNavigation/UserNavigation';
import { ProfilePassword } from "@/components/molecules/ProfileDetails/ProfilePassword"
import { retrieveCustomer } from "@/lib/data/customer"
-export default async function ReviewsPage() {
+export default function ReviewsPage() {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <ReviewsPageContent />
+ </Suspense>
+ )
+}
+
+async function ReviewsPageContent() {
const user = await retrieveCustomer()
if (!user) return <LoginForm />
diff --git a/apps/storefront/src/app/[locale]/(reset-password)/layout.tsx b/apps/storefront/src/app/[locale]/(reset-password)/layout.tsx
index 19272e8a8..9a9286c31 100644
--- a/apps/storefront/src/app/[locale]/(reset-password)/layout.tsx
+++ b/apps/storefront/src/app/[locale]/(reset-password)/layout.tsx
@@ -1,26 +1,12 @@
-import { Footer, Header } from "@/components/organisms"
-import { checkRegion } from "@/lib/helpers/check-region"
-import { redirect } from "next/navigation"
-
-export default async function ResetPasswordLayout({
- children,
- params,
-}: Readonly<{
- children: React.ReactNode
- params: Promise<{ locale: string }>
-}>) {
- const { locale } = await params
- const regionCheck = await checkRegion(locale)
-
- if (!regionCheck) {
- return redirect("/")
- }
+import { Footer } from '@/components/organisms/Footer/Footer';
+import { Header } from '@/components/organisms/Header/Header';
+export default function ResetPasswordLayout({ children }: { children: React.ReactNode }) {
return (
<>
- <Header locale={locale} />
+ <Header />
{children}
<Footer />
</>
- )
+ );
}
diff --git a/apps/storefront/src/app/[locale]/(reset-password)/reset-password/page.tsx b/apps/storefront/src/app/[locale]/(reset-password)/reset-password/page.tsx
index d084f27e2..7de845ddc 100644
--- a/apps/storefront/src/app/[locale]/(reset-password)/reset-password/page.tsx
+++ b/apps/storefront/src/app/[locale]/(reset-password)/reset-password/page.tsx
@@ -1,4 +1,6 @@
-import { Card } from "@/components/atoms"
+import { Suspense } from "react"
+import { RouteFallback } from "@/components/molecules/RouteFallback/RouteFallback"
+import { Card } from '@/components/atoms/Card/Card';
import { ProfilePasswordForm } from "@/components/molecules/ProfilePasswordForm/ProfilePasswordForm"
import type { Metadata } from "next"
@@ -7,7 +9,17 @@ export const metadata: Metadata = {
robots: { index: false, follow: false },
}
-export default async function ResetPasswordPage({
+export default function ResetPasswordPage(props: {
+ searchParams: Promise<{ token: string }>
+}) {
+ return (
+ <Suspense fallback={<RouteFallback />}>
+ <ResetPasswordPageContent {...props} />
+ </Suspense>
+ )
+}
+
+async function ResetPasswordPageContent({
searchParams,
}: {
searchParams: Promise<{ token: string }>
diff --git a/apps/storefront/src/app/[locale]/layout.tsx b/apps/storefront/src/app/[locale]/layout.tsx
new file mode 100644
index 000000000..5f3e28dbc
--- /dev/null
+++ b/apps/storefront/src/app/[locale]/layout.tsx
@@ -0,0 +1,32 @@
+import { redirect } from "next/navigation"
+
+import { CartDrawer } from "@/components/cells/CartDrawer/CartDrawer"
+import { LocaleProvider } from "@/components/providers/Locale/LocaleProvider"
+import { listCountryCodes } from "@/lib/data/regions"
+
+const DEFAULT_REGION = process.env.NEXT_PUBLIC_DEFAULT_REGION || "us"
+
+export async function generateStaticParams() {
+ const countryCodes = await listCountryCodes()
+ const locales = countryCodes.length ? countryCodes : [DEFAULT_REGION]
+ return locales.map((locale) => ({ locale }))
+}
+
+export default async function LocaleLayout({
+ children,
+ params,
+}: LayoutProps<"/[locale]">) {
+ const { locale } = await params
+
+ const countryCodes = await listCountryCodes()
+ if (countryCodes.length && !countryCodes.includes(locale)) {
+ redirect("/")
+ }
+
+ return (
+ <LocaleProvider locale={locale}>
+ {children}
+ <CartDrawer />
+ </LocaleProvider>
+ )
+}
diff --git a/apps/storefront/src/app/api/revalidate/route.ts b/apps/storefront/src/app/api/revalidate/route.ts
index 975c493be..0221dc3e8 100644
--- a/apps/storefront/src/app/api/revalidate/route.ts
+++ b/apps/storefront/src/app/api/revalidate/route.ts
@@ -1,7 +1,6 @@
import { revalidateTag } from 'next/cache';
import { NextRequest, NextResponse } from 'next/server';
-export const runtime = 'nodejs';
type RevalidatePayload = {
tags?: string[];
@@ -46,7 +45,7 @@ export async function POST(request: NextRequest) {
}
for (const tag of tags) {
- revalidateTag(tag);
+ revalidateTag(tag, 'max');
}
return NextResponse.json({ revalidated: true, tags });
diff --git a/apps/storefront/src/app/layout.tsx b/apps/storefront/src/app/layout.tsx
index 7a590b256..acf04c23c 100644
--- a/apps/storefront/src/app/layout.tsx
+++ b/apps/storefront/src/app/layout.tsx
@@ -3,9 +3,7 @@ import type { Metadata } from 'next';
import './globals.css';
import { Toaster } from '@medusajs/ui';
-import Head from 'next/head';
-import { HtmlLangSetter } from '@/components/atoms/HtmlLangSetter/HtmlLangSetter';
import { retrieveCart } from '@/lib/data/cart';
import { Providers } from './providers';
@@ -29,7 +27,7 @@ export default function RootLayout({
}>) {
const cartPromise = retrieveCart();
- // default lang updated by HtmlLangSetter
+ // LocaleProvider sets the visitor's language once the [locale] segment renders.
const htmlLang = 'en';
return (
@@ -37,7 +35,7 @@ export default function RootLayout({
lang={htmlLang}
className=""
>
- <Head>
+ <head>
<link
rel="preconnect"
href="https://i.imgur.com"
@@ -84,9 +82,8 @@ export default function RootLayout({
rel="dns-prefetch"
href="https://api.mercurjs.com"
/>
- </Head>
+ </head>
<body className="relative bg-primary text-secondary antialiased">
- <HtmlLangSetter />
<Providers cartPromise={cartPromise}>{children}</Providers>
<Toaster position="top-right" />
</body>
diff --git a/apps/storefront/src/app/providers.tsx b/apps/storefront/src/app/providers.tsx
index beac944df..13fa226a8 100644
--- a/apps/storefront/src/app/providers.tsx
+++ b/apps/storefront/src/app/providers.tsx
@@ -1,6 +1,5 @@
"use client"
-import { CartDrawer } from "@/components/cells/CartDrawer/CartDrawer"
import { CartProvider } from "@/components/providers"
import { Cart } from "@/types/cart"
import type React from "react"
@@ -15,7 +14,6 @@ export function Providers({ children, cartPromise }: ProvidersProps) {
return (
<CartProvider cartPromise={cartPromise}>
{children}
- <CartDrawer />
</CartProvider>
)
}
diff --git a/apps/storefront/src/components/atoms/HtmlLangSetter/HtmlLangSetter.tsx b/apps/storefront/src/components/atoms/HtmlLangSetter/HtmlLangSetter.tsx
deleted file mode 100644
index d8f4e8cdf..000000000
--- a/apps/storefront/src/components/atoms/HtmlLangSetter/HtmlLangSetter.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-'use client';
-
-import { useEffect } from 'react';
-
-import { usePathname } from 'next/navigation';
-
-import { toHreflang } from '@/lib/helpers/hreflang';
-
-export function HtmlLangSetter() {
- const pathname = usePathname();
-
- useEffect(() => {
- const localeMatch = pathname?.match(/^\/([a-z]{2})(?:\/|$)/i);
- const locale = localeMatch?.[1] || 'en';
- const htmlLang = toHreflang(locale);
-
- if (typeof document !== 'undefined') {
- document.documentElement.lang = htmlLang;
- }
- }, [pathname]);
-
- return null;
-}
diff --git a/apps/storefront/src/components/cells/ActiveFilterElement/ActiveFilterElement.tsx b/apps/storefront/src/components/cells/ActiveFilterElement/ActiveFilterElement.tsx
index a3a01202a..9bb169e36 100644
--- a/apps/storefront/src/components/cells/ActiveFilterElement/ActiveFilterElement.tsx
+++ b/apps/storefront/src/components/cells/ActiveFilterElement/ActiveFilterElement.tsx
@@ -1,5 +1,5 @@
"use client"
-import { Chip } from "@/components/atoms"
+import { Chip } from '@/components/atoms/Chip/Chip';
import useFilters from "@/hooks/useFilters"
import { CloseIcon } from "@/icons"
diff --git a/apps/storefront/src/components/cells/BrandFilter/BrandFilter.tsx b/apps/storefront/src/components/cells/BrandFilter/BrandFilter.tsx
index 57e06993a..c683849a5 100644
--- a/apps/storefront/src/components/cells/BrandFilter/BrandFilter.tsx
+++ b/apps/storefront/src/components/cells/BrandFilter/BrandFilter.tsx
@@ -1,10 +1,8 @@
'use client';
-import { Input } from '@/components/atoms';
-import {
- Accordion,
- FilterCheckboxOption,
-} from '@/components/molecules';
+import { Input } from '@/components/atoms/Input/Input';
+import { Accordion } from '@/components/molecules/Accordion/Accordion';
+import { FilterCheckboxOption } from '@/components/molecules/FilterCheckboxOption/FilterCheckboxOption';
import useFilters from '@/hooks/useFilters';
import { SearchIcon } from '@/icons';
import { useEffect, useState } from 'react';
diff --git a/apps/storefront/src/components/cells/Carousel/Carousel.tsx b/apps/storefront/src/components/cells/Carousel/Carousel.tsx
index e8daa49b0..364f0bd33 100644
--- a/apps/storefront/src/components/cells/Carousel/Carousel.tsx
+++ b/apps/storefront/src/components/cells/Carousel/Carousel.tsx
@@ -2,7 +2,7 @@
import useEmblaCarousel from "embla-carousel-react"
-import { Indicator } from "@/components/atoms"
+import { Indicator } from '@/components/atoms/Indicator/Indicator';
import { ArrowLeftIcon, ArrowRightIcon } from "@/icons"
import { useCallback, useEffect, useState } from "react"
import { EmblaCarouselType } from "embla-carousel"
diff --git a/apps/storefront/src/components/cells/CartButton/CartButton.tsx b/apps/storefront/src/components/cells/CartButton/CartButton.tsx
index 61dd1747b..828e0b186 100644
--- a/apps/storefront/src/components/cells/CartButton/CartButton.tsx
+++ b/apps/storefront/src/components/cells/CartButton/CartButton.tsx
@@ -1,6 +1,6 @@
"use client"
-import { Badge } from "@/components/atoms"
+import { Badge } from '@/components/atoms/Badge/Badge';
import { useCartContext } from "@/components/providers"
import { useCartDrawer } from "@/components/providers/Cart/drawer"
import { CartIcon } from "@/icons"
diff --git a/apps/storefront/src/components/cells/CartDrawer/CartDrawer.tsx b/apps/storefront/src/components/cells/CartDrawer/CartDrawer.tsx
index 639c987b3..e423298c6 100644
--- a/apps/storefront/src/components/cells/CartDrawer/CartDrawer.tsx
+++ b/apps/storefront/src/components/cells/CartDrawer/CartDrawer.tsx
@@ -5,7 +5,7 @@ import { Dialog, DialogBackdrop, DialogPanel, DialogTitle } from "@headlessui/re
import { HttpTypes } from "@medusajs/types"
import Image from "next/image"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { DeleteCartItemButton } from "@/components/molecules/DeleteCartItemButton/DeleteCartItemButton"
import { UpdateCartItemButton } from "@/components/molecules/UpdateCartItemButton/UpdateCartItemButton"
diff --git a/apps/storefront/src/components/cells/CartItemsHeader/CartItemsHeader.tsx b/apps/storefront/src/components/cells/CartItemsHeader/CartItemsHeader.tsx
index c9acf7519..90580472e 100644
--- a/apps/storefront/src/components/cells/CartItemsHeader/CartItemsHeader.tsx
+++ b/apps/storefront/src/components/cells/CartItemsHeader/CartItemsHeader.tsx
@@ -1,4 +1,4 @@
-import { Divider } from "@/components/atoms"
+import { Divider } from '@/components/atoms/Divider/Divider';
import { SingleProductSeller } from "@/types/product"
import { format } from "date-fns"
import { SellerAvatar } from "../SellerAvatar/SellerAvatar"
diff --git a/apps/storefront/src/components/cells/CartItemsProducts/CartItemsProducts.tsx b/apps/storefront/src/components/cells/CartItemsProducts/CartItemsProducts.tsx
index 850965547..85e5b5b45 100644
--- a/apps/storefront/src/components/cells/CartItemsProducts/CartItemsProducts.tsx
+++ b/apps/storefront/src/components/cells/CartItemsProducts/CartItemsProducts.tsx
@@ -1,7 +1,7 @@
import { HttpTypes } from '@medusajs/types';
import Image from 'next/image';
-import { DeleteCartItemButton } from '@/components/molecules';
+import { DeleteCartItemButton } from '@/components/molecules/DeleteCartItemButton/DeleteCartItemButton';
import LocalizedClientLink from '@/components/molecules/LocalizedLink/LocalizedLink';
import { UpdateCartItemButton } from '@/components/molecules/UpdateCartItemButton/UpdateCartItemButton';
import { filterValidCartItems } from '@/lib/helpers/filter-valid-cart-items';
diff --git a/apps/storefront/src/components/cells/ColorFilter/ColorFilter.tsx b/apps/storefront/src/components/cells/ColorFilter/ColorFilter.tsx
index 00229bddf..348216ef6 100644
--- a/apps/storefront/src/components/cells/ColorFilter/ColorFilter.tsx
+++ b/apps/storefront/src/components/cells/ColorFilter/ColorFilter.tsx
@@ -1,9 +1,7 @@
'use client';
-import {
- Accordion,
- FilterCheckboxOption,
-} from '@/components/molecules';
+import { Accordion } from '@/components/molecules/Accordion/Accordion';
+import { FilterCheckboxOption } from '@/components/molecules/FilterCheckboxOption/FilterCheckboxOption';
import { cn } from '@/lib/utils';
import useFilters from '@/hooks/useFilters';
diff --git a/apps/storefront/src/components/cells/ConditionFilter/ConditionFilter.tsx b/apps/storefront/src/components/cells/ConditionFilter/ConditionFilter.tsx
index ac0d78e1e..d4fd07412 100644
--- a/apps/storefront/src/components/cells/ConditionFilter/ConditionFilter.tsx
+++ b/apps/storefront/src/components/cells/ConditionFilter/ConditionFilter.tsx
@@ -1,6 +1,7 @@
"use client"
-import { Accordion, FilterCheckboxOption } from "@/components/molecules"
+import { Accordion } from '@/components/molecules/Accordion/Accordion';
+import { FilterCheckboxOption } from '@/components/molecules/FilterCheckboxOption/FilterCheckboxOption';
import useFilters from "@/hooks/useFilters"
const filters = [
diff --git a/apps/storefront/src/components/cells/HeadingCategories/HeadingCategories.tsx b/apps/storefront/src/components/cells/HeadingCategories/HeadingCategories.tsx
index d09e7d7b3..273142028 100644
--- a/apps/storefront/src/components/cells/HeadingCategories/HeadingCategories.tsx
+++ b/apps/storefront/src/components/cells/HeadingCategories/HeadingCategories.tsx
@@ -2,15 +2,14 @@
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { cn } from "@/lib/utils"
import { HttpTypes } from "@medusajs/types"
-import { useParams } from "next/navigation"
+import { ActiveCategory } from "@/components/molecules/ActiveCategory/ActiveCategory"
-export const HeadingCategories = ({
+const HeadingCategoriesView = ({
+ category,
categories,
}: {
categories: HttpTypes.StoreProductCategory[]
-}) => {
- const { category } = useParams()
-
+} & { category?: string }) => {
return (
<nav className="hidden lg:flex space-x-2 items-center flex-col md:flex-row">
{categories?.map(({ id, handle, name }) => (
@@ -28,3 +27,11 @@ export const HeadingCategories = ({
</nav>
)
}
+
+export const HeadingCategories = (props: {
+ categories: HttpTypes.StoreProductCategory[]
+}) => (
+ <ActiveCategory fallback={<HeadingCategoriesView {...props} />}>
+ {(category) => <HeadingCategoriesView {...props} category={category} />}
+ </ActiveCategory>
+)
diff --git a/apps/storefront/src/components/cells/LabeledInput/LabeledInput.tsx b/apps/storefront/src/components/cells/LabeledInput/LabeledInput.tsx
index cd5248258..ab2d18b80 100644
--- a/apps/storefront/src/components/cells/LabeledInput/LabeledInput.tsx
+++ b/apps/storefront/src/components/cells/LabeledInput/LabeledInput.tsx
@@ -1,5 +1,5 @@
"use client"
-import { Input } from "@/components/atoms"
+import { Input } from '@/components/atoms/Input/Input';
import { cn } from "@/lib/utils"
import { FieldError } from "react-hook-form"
diff --git a/apps/storefront/src/components/cells/MobileNavbar/MobileNavbar.tsx b/apps/storefront/src/components/cells/MobileNavbar/MobileNavbar.tsx
index 417f64079..2505e572e 100644
--- a/apps/storefront/src/components/cells/MobileNavbar/MobileNavbar.tsx
+++ b/apps/storefront/src/components/cells/MobileNavbar/MobileNavbar.tsx
@@ -4,8 +4,8 @@ import { useEffect, useState } from 'react';
import { HttpTypes } from '@medusajs/types';
-import { IconButton } from '@/components/atoms';
-import { HeaderCategoryNavbar } from '@/components/molecules';
+import { IconButton } from '@/components/atoms/IconButton/IconButton';
+import { HeaderCategoryNavbar } from '@/components/molecules/HeaderCategoryNavbar/HeaderCategoryNavbar';
import { CloseIcon, HamburgerMenuIcon } from '@/icons';
import { MobileCategoryNavbar } from './components';
diff --git a/apps/storefront/src/components/cells/MobileNavbar/components/MobileCategoryDrawer.tsx b/apps/storefront/src/components/cells/MobileNavbar/components/MobileCategoryDrawer.tsx
index 935eb87cd..23f7601f0 100644
--- a/apps/storefront/src/components/cells/MobileNavbar/components/MobileCategoryDrawer.tsx
+++ b/apps/storefront/src/components/cells/MobileNavbar/components/MobileCategoryDrawer.tsx
@@ -5,7 +5,7 @@ import { useEffect } from "react"
import { cn } from "@/lib/utils"
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { ArrowLeftIcon, CloseIcon } from "@/icons"
-import { IconButton } from "@/components/atoms"
+import { IconButton } from '@/components/atoms/IconButton/IconButton';
interface MobileCategoryDrawerProps {
category: HttpTypes.StoreProductCategory
diff --git a/apps/storefront/src/components/cells/MobileNavbar/components/MobileCategoryNavbar.tsx b/apps/storefront/src/components/cells/MobileNavbar/components/MobileCategoryNavbar.tsx
index 4b4745dcd..0cc2f25ff 100644
--- a/apps/storefront/src/components/cells/MobileNavbar/components/MobileCategoryNavbar.tsx
+++ b/apps/storefront/src/components/cells/MobileNavbar/components/MobileCategoryNavbar.tsx
@@ -2,7 +2,7 @@
import { HttpTypes } from "@medusajs/types"
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { cn } from "@/lib/utils"
-import { useParams } from "next/navigation"
+import { ActiveCategory } from "@/components/molecules/ActiveCategory/ActiveCategory"
import { CollapseIcon } from "@/icons"
import { useMemo, useState } from "react"
import {
@@ -18,12 +18,12 @@ interface MobileCategoryNavbarProps {
onClose?: (state: boolean) => void
}
-export const MobileCategoryNavbar = ({
+const MobileCategoryNavbarView = ({
+ category,
categories,
parentCategories = [],
onClose,
-}: MobileCategoryNavbarProps) => {
- const { category } = useParams<{ category?: string }>()
+}: MobileCategoryNavbarProps & { category?: string }) => {
const [selectedCategory, setSelectedCategory] = useState<HttpTypes.StoreProductCategory | null>(null)
const activeParentHandle = useMemo(
@@ -120,3 +120,9 @@ export const MobileCategoryNavbar = ({
</>
)
}
+
+export const MobileCategoryNavbar = (props: MobileCategoryNavbarProps) => (
+ <ActiveCategory fallback={<MobileCategoryNavbarView {...props} />}>
+ {(category) => <MobileCategoryNavbarView {...props} category={category} />}
+ </ActiveCategory>
+)
diff --git a/apps/storefront/src/components/cells/Navbar/Navbar.tsx b/apps/storefront/src/components/cells/Navbar/Navbar.tsx
index 8888b1ca7..851c01b89 100644
--- a/apps/storefront/src/components/cells/Navbar/Navbar.tsx
+++ b/apps/storefront/src/components/cells/Navbar/Navbar.tsx
@@ -1,5 +1,6 @@
import { HttpTypes } from "@medusajs/types"
-import { CategoryNavbar, NavbarSearch } from "@/components/molecules"
+import { CategoryNavbar } from '@/components/molecules/CategoryNavbar/CategoryNavbar';
+import { NavbarSearch } from '@/components/molecules/NavbarSearch/NavbarSearch';
export const Navbar = ({
categories,
diff --git a/apps/storefront/src/components/cells/OrderAddresses/OrderAddresses.tsx b/apps/storefront/src/components/cells/OrderAddresses/OrderAddresses.tsx
index cc6bcfc0b..2dedc92de 100644
--- a/apps/storefront/src/components/cells/OrderAddresses/OrderAddresses.tsx
+++ b/apps/storefront/src/components/cells/OrderAddresses/OrderAddresses.tsx
@@ -1,4 +1,4 @@
-import { Card } from "@/components/atoms"
+import { Card } from '@/components/atoms/Card/Card';
import { retrieveCustomer } from "@/lib/data/customer"
import { getRegion } from "@/lib/data/regions"
diff --git a/apps/storefront/src/components/cells/OrderCancel/OrderCancel.tsx b/apps/storefront/src/components/cells/OrderCancel/OrderCancel.tsx
index 7e70ba6d0..a8f57f9a9 100644
--- a/apps/storefront/src/components/cells/OrderCancel/OrderCancel.tsx
+++ b/apps/storefront/src/components/cells/OrderCancel/OrderCancel.tsx
@@ -1,7 +1,9 @@
"use client"
-import { Button, Checkbox, Divider } from "@/components/atoms"
-import { Modal } from "@/components/molecules"
+import { Button } from '@/components/atoms/Button/Button';
+import { Checkbox } from '@/components/atoms/Checkbox/Checkbox';
+import { Divider } from '@/components/atoms/Divider/Divider';
+import { Modal } from '@/components/molecules/Modal/Modal';
import { useState } from "react"
import Image from "next/image"
import { convertToLocale } from "@/lib/helpers/money"
diff --git a/apps/storefront/src/components/cells/OrderProductListItem/OrderProductListItem.tsx b/apps/storefront/src/components/cells/OrderProductListItem/OrderProductListItem.tsx
index f271f25ee..f606d2f58 100644
--- a/apps/storefront/src/components/cells/OrderProductListItem/OrderProductListItem.tsx
+++ b/apps/storefront/src/components/cells/OrderProductListItem/OrderProductListItem.tsx
@@ -2,7 +2,7 @@ import { Fragment } from 'react';
import Image from 'next/image';
-import { Divider } from '@/components/atoms';
+import { Divider } from '@/components/atoms/Divider/Divider';
import LocalizedClientLink from '@/components/molecules/LocalizedLink/LocalizedLink';
import { convertToLocale } from '@/lib/helpers/money';
import { cn } from '@/lib/utils';
diff --git a/apps/storefront/src/components/cells/OrderReturn/OrderReturn.tsx b/apps/storefront/src/components/cells/OrderReturn/OrderReturn.tsx
index 344492ce4..cab47b7f5 100644
--- a/apps/storefront/src/components/cells/OrderReturn/OrderReturn.tsx
+++ b/apps/storefront/src/components/cells/OrderReturn/OrderReturn.tsx
@@ -1,6 +1,6 @@
"use client"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import Link from "next/link"
export const OrderReturn = ({ order }: { order: any }) => {
diff --git a/apps/storefront/src/components/cells/OrderTrack/OrderTrack.tsx b/apps/storefront/src/components/cells/OrderTrack/OrderTrack.tsx
index 329a213b0..b74895921 100644
--- a/apps/storefront/src/components/cells/OrderTrack/OrderTrack.tsx
+++ b/apps/storefront/src/components/cells/OrderTrack/OrderTrack.tsx
@@ -1,4 +1,4 @@
-import { Card } from "@/components/atoms"
+import { Card } from '@/components/atoms/Card/Card';
export const OrderTrack = ({ order }: { order: any }) => {
if (!order.fulfillments[0]?.labels?.length) return null
diff --git a/apps/storefront/src/components/cells/Pagination/Pagination.tsx b/apps/storefront/src/components/cells/Pagination/Pagination.tsx
index ae67b3629..9cd3aefbd 100644
--- a/apps/storefront/src/components/cells/Pagination/Pagination.tsx
+++ b/apps/storefront/src/components/cells/Pagination/Pagination.tsx
@@ -1,5 +1,5 @@
"use client"
-import { PaginationButton } from "@/components/atoms"
+import { PaginationButton } from '@/components/atoms/PaginationButton/PaginationButton';
import { CollapseIcon, MeatballsMenuIcon } from "@/icons"
export const Pagination = ({
diff --git a/apps/storefront/src/components/cells/PasswordValidator/PasswordValidator.tsx b/apps/storefront/src/components/cells/PasswordValidator/PasswordValidator.tsx
index dfc03c4e8..29f405891 100644
--- a/apps/storefront/src/components/cells/PasswordValidator/PasswordValidator.tsx
+++ b/apps/storefront/src/components/cells/PasswordValidator/PasswordValidator.tsx
@@ -4,7 +4,7 @@ import { useEffect, useState } from 'react';
import { CheckCircle } from '@medusajs/icons';
-import { Card } from '@/components/atoms';
+import { Card } from '@/components/atoms/Card/Card';
import { cn } from '@/lib/utils';
function validatePassword(password: string) {
diff --git a/apps/storefront/src/components/cells/PriceFilter/PriceFilter.tsx b/apps/storefront/src/components/cells/PriceFilter/PriceFilter.tsx
index 8650d6ed2..c074538ba 100644
--- a/apps/storefront/src/components/cells/PriceFilter/PriceFilter.tsx
+++ b/apps/storefront/src/components/cells/PriceFilter/PriceFilter.tsx
@@ -2,8 +2,9 @@
import { useEffect, useState } from "react"
import { useSearchParams } from "next/navigation"
-import { Input } from "@/components/atoms"
-import { Accordion, FilterCheckboxOption } from "@/components/molecules"
+import { Input } from '@/components/atoms/Input/Input';
+import { Accordion } from '@/components/molecules/Accordion/Accordion';
+import { FilterCheckboxOption } from '@/components/molecules/FilterCheckboxOption/FilterCheckboxOption';
import useUpdateSearchParams from "@/hooks/useUpdateSearchParams"
import { DollarIcon } from "@/icons"
import useFilters from "@/hooks/useFilters"
diff --git a/apps/storefront/src/components/cells/ProductAdditionalAttributes/ProductAdditionalAttributes.tsx b/apps/storefront/src/components/cells/ProductAdditionalAttributes/ProductAdditionalAttributes.tsx
index 32c6350cc..cc88d7688 100644
--- a/apps/storefront/src/components/cells/ProductAdditionalAttributes/ProductAdditionalAttributes.tsx
+++ b/apps/storefront/src/components/cells/ProductAdditionalAttributes/ProductAdditionalAttributes.tsx
@@ -1,4 +1,4 @@
-import { ProductPageAccordion } from "@/components/molecules"
+import { ProductPageAccordion } from '@/components/molecules/ProductPageAccordion/ProductPageAccordion';
import { AdditionalAttributeProps } from "@/types/product"
export const ProductAdditionalAttributes = ({
diff --git a/apps/storefront/src/components/cells/ProductCarousel/ProductCarousel.tsx b/apps/storefront/src/components/cells/ProductCarousel/ProductCarousel.tsx
index ebf135a13..fbbac39c3 100644
--- a/apps/storefront/src/components/cells/ProductCarousel/ProductCarousel.tsx
+++ b/apps/storefront/src/components/cells/ProductCarousel/ProductCarousel.tsx
@@ -3,7 +3,7 @@
import useEmblaCarousel from "embla-carousel-react"
import { HttpTypes } from "@medusajs/types"
import Image from "next/image"
-import { ProductCarouselIndicator } from "@/components/molecules"
+import { ProductCarouselIndicator } from '@/components/molecules/ProductCarouselIndicator/ProductCarouselIndicator';
import { useScreenSize } from "@/hooks/useScreenSize"
export const ProductCarousel = ({
diff --git a/apps/storefront/src/components/cells/ProductDetailsFooter/ProductDetailsFooter.tsx b/apps/storefront/src/components/cells/ProductDetailsFooter/ProductDetailsFooter.tsx
index 86934ea03..eab2b8fec 100644
--- a/apps/storefront/src/components/cells/ProductDetailsFooter/ProductDetailsFooter.tsx
+++ b/apps/storefront/src/components/cells/ProductDetailsFooter/ProductDetailsFooter.tsx
@@ -1,8 +1,6 @@
-import {
- ProductPostedDate,
- ProductReportButton,
- ProductTags,
-} from '@/components/molecules';
+import { ProductPostedDate } from '@/components/molecules/ProductPostedDate/ProductPostedDate';
+import { ProductReportButton } from '@/components/molecules/ProductReportButton/ProductReportButton';
+import { ProductTags } from '@/components/molecules/ProductTags/ProductTags';
import { HttpTypes } from '@medusajs/types';
export const ProductDetailsFooter = ({
diff --git a/apps/storefront/src/components/cells/ProductDetailsHeader/ProductDetailsHeader.tsx b/apps/storefront/src/components/cells/ProductDetailsHeader/ProductDetailsHeader.tsx
index f628e3ffd..00445e6ae 100644
--- a/apps/storefront/src/components/cells/ProductDetailsHeader/ProductDetailsHeader.tsx
+++ b/apps/storefront/src/components/cells/ProductDetailsHeader/ProductDetailsHeader.tsx
@@ -1,9 +1,9 @@
"use client"
import { useState } from "react"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import { HttpTypes } from "@medusajs/types"
-import { ProductVariants } from "@/components/molecules"
+import { ProductVariants } from '@/components/molecules/ProductVariants/ProductVariants';
import useGetAllSearchParams from "@/hooks/useGetAllSearchParams"
import { getProductPrice } from "@/lib/helpers/get-product-price"
import { convertToLocale } from "@/lib/helpers/money"
diff --git a/apps/storefront/src/components/cells/ProductDetailsMeasurements/ProductDetailsMeasurements.tsx b/apps/storefront/src/components/cells/ProductDetailsMeasurements/ProductDetailsMeasurements.tsx
index b53ce6d06..724151c03 100644
--- a/apps/storefront/src/components/cells/ProductDetailsMeasurements/ProductDetailsMeasurements.tsx
+++ b/apps/storefront/src/components/cells/ProductDetailsMeasurements/ProductDetailsMeasurements.tsx
@@ -1,7 +1,5 @@
-import {
- ProductPageAccordion,
- ProdutMeasurementRow,
-} from '@/components/molecules';
+import { ProductPageAccordion } from '@/components/molecules/ProductPageAccordion/ProductPageAccordion';
+import { ProdutMeasurementRow } from '@/components/molecules/ProdutMeasurementRow/ProdutMeasurementRow';
import { SingleProductMeasurement } from '@/types/product';
export const ProductDetailsMeasurements = ({
diff --git a/apps/storefront/src/components/cells/ProductDetailsSeller/ProductDetailsSeller.tsx b/apps/storefront/src/components/cells/ProductDetailsSeller/ProductDetailsSeller.tsx
index 2d64cae92..d4a2bfd1f 100644
--- a/apps/storefront/src/components/cells/ProductDetailsSeller/ProductDetailsSeller.tsx
+++ b/apps/storefront/src/components/cells/ProductDetailsSeller/ProductDetailsSeller.tsx
@@ -1,4 +1,4 @@
-import { SellerInfo } from "@/components/molecules"
+import { SellerInfo } from '@/components/molecules/SellerInfo/SellerInfo';
import { SellerDTO } from "@mercurjs/types"
export const ProductDetailsSeller = ({ seller }: { seller?: SellerDTO }) => {
diff --git a/apps/storefront/src/components/cells/ProductDetailsSellerReviews/ProductDetailsSellerReviews.tsx b/apps/storefront/src/components/cells/ProductDetailsSellerReviews/ProductDetailsSellerReviews.tsx
index fcbe0a8b2..eb31c15fb 100644
--- a/apps/storefront/src/components/cells/ProductDetailsSellerReviews/ProductDetailsSellerReviews.tsx
+++ b/apps/storefront/src/components/cells/ProductDetailsSellerReviews/ProductDetailsSellerReviews.tsx
@@ -1,5 +1,5 @@
-import { Button } from '@/components/atoms';
-import { SellerReview } from '@/components/molecules';
+import { Button } from '@/components/atoms/Button/Button';
+import { SellerReview } from '@/components/molecules/SellerReview/SellerReview';
import { SingleProductReview } from '@/types/product';
export const ProductDetailsSellerReviews = ({
diff --git a/apps/storefront/src/components/cells/ProductDetailsShipping/ProductDetailsShipping.tsx b/apps/storefront/src/components/cells/ProductDetailsShipping/ProductDetailsShipping.tsx
index 0f049aa37..73a59b0aa 100644
--- a/apps/storefront/src/components/cells/ProductDetailsShipping/ProductDetailsShipping.tsx
+++ b/apps/storefront/src/components/cells/ProductDetailsShipping/ProductDetailsShipping.tsx
@@ -1,4 +1,4 @@
-import { ProductPageAccordion } from '@/components/molecules';
+import { ProductPageAccordion } from '@/components/molecules/ProductPageAccordion/ProductPageAccordion';
export const ProductDetailsShipping = () => {
return (
diff --git a/apps/storefront/src/components/cells/ProductFilter/ProductFilter.tsx b/apps/storefront/src/components/cells/ProductFilter/ProductFilter.tsx
index 76b96e373..e8a01b381 100644
--- a/apps/storefront/src/components/cells/ProductFilter/ProductFilter.tsx
+++ b/apps/storefront/src/components/cells/ProductFilter/ProductFilter.tsx
@@ -1,9 +1,7 @@
'use client';
-import {
- Accordion,
- FilterCheckboxOption,
-} from '@/components/molecules';
+import { Accordion } from '@/components/molecules/Accordion/Accordion';
+import { FilterCheckboxOption } from '@/components/molecules/FilterCheckboxOption/FilterCheckboxOption';
import useFilters from '@/hooks/useFilters';
const filters = [
diff --git a/apps/storefront/src/components/cells/ProductPageDetails/ProductPageDetails.tsx b/apps/storefront/src/components/cells/ProductPageDetails/ProductPageDetails.tsx
index 9cd24b3fd..6d440b68c 100644
--- a/apps/storefront/src/components/cells/ProductPageDetails/ProductPageDetails.tsx
+++ b/apps/storefront/src/components/cells/ProductPageDetails/ProductPageDetails.tsx
@@ -1,4 +1,4 @@
-import { ProductPageAccordion } from "@/components/molecules"
+import { ProductPageAccordion } from '@/components/molecules/ProductPageAccordion/ProductPageAccordion';
import { isRichText, sanitizeRichText } from "@/lib/helpers/sanitize-rich-text"
export const ProductPageDetails = ({ details }: { details: string }) => {
diff --git a/apps/storefront/src/components/cells/RefreshButton/RefreshButton.tsx b/apps/storefront/src/components/cells/RefreshButton/RefreshButton.tsx
index 32e4d55a4..8b8d4a7aa 100644
--- a/apps/storefront/src/components/cells/RefreshButton/RefreshButton.tsx
+++ b/apps/storefront/src/components/cells/RefreshButton/RefreshButton.tsx
@@ -1,5 +1,5 @@
"use client"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import { cn } from "@/lib/utils"
import { useRouter } from "next/navigation"
diff --git a/apps/storefront/src/components/cells/SellNowButton/SellNowButton.tsx b/apps/storefront/src/components/cells/SellNowButton/SellNowButton.tsx
index 85cdc63c8..155535ead 100644
--- a/apps/storefront/src/components/cells/SellNowButton/SellNowButton.tsx
+++ b/apps/storefront/src/components/cells/SellNowButton/SellNowButton.tsx
@@ -1,4 +1,4 @@
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import { ArrowRightIcon } from "@/icons"
import Link from "next/link"
diff --git a/apps/storefront/src/components/cells/SellerRatingFilter/SellerRatingFilter.tsx b/apps/storefront/src/components/cells/SellerRatingFilter/SellerRatingFilter.tsx
index ec20eb5ee..52474ce7a 100644
--- a/apps/storefront/src/components/cells/SellerRatingFilter/SellerRatingFilter.tsx
+++ b/apps/storefront/src/components/cells/SellerRatingFilter/SellerRatingFilter.tsx
@@ -1,10 +1,8 @@
'use client';
-import {
- Accordion,
- FilterCheckboxOption,
-} from '@/components/molecules';
-import { StarRating } from '@/components/atoms';
+import { Accordion } from '@/components/molecules/Accordion/Accordion';
+import { FilterCheckboxOption } from '@/components/molecules/FilterCheckboxOption/FilterCheckboxOption';
+import { StarRating } from '@/components/atoms/StarRating/StarRating';
import { cn } from '@/lib/utils';
import useFilters from '@/hooks/useFilters';
diff --git a/apps/storefront/src/components/cells/SizeFilter/SizeFilter.tsx b/apps/storefront/src/components/cells/SizeFilter/SizeFilter.tsx
index c1aed1ed3..ed00dd892 100644
--- a/apps/storefront/src/components/cells/SizeFilter/SizeFilter.tsx
+++ b/apps/storefront/src/components/cells/SizeFilter/SizeFilter.tsx
@@ -1,6 +1,7 @@
"use client"
-import { Chip } from "@/components/atoms"
-import { Accordion, SelectField } from "@/components/molecules"
+import { Chip } from '@/components/atoms/Chip/Chip';
+import { Accordion } from '@/components/molecules/Accordion/Accordion';
+import { SelectField } from '@/components/molecules/SelectField/SelectField';
import useFilters from "@/hooks/useFilters"
import useUpdateSearchParams from "@/hooks/useUpdateSearchParams"
import { useSearchParams } from "next/navigation"
diff --git a/apps/storefront/src/components/cells/UserDropdown/UserDropdown.tsx b/apps/storefront/src/components/cells/UserDropdown/UserDropdown.tsx
index 603440acf..8f1118718 100644
--- a/apps/storefront/src/components/cells/UserDropdown/UserDropdown.tsx
+++ b/apps/storefront/src/components/cells/UserDropdown/UserDropdown.tsx
@@ -1,12 +1,10 @@
"use client"
-import {
- Badge,
- Divider,
- LogoutButton,
- NavigationItem,
-} from "@/components/atoms"
-import { Dropdown } from "@/components/molecules"
+import { Badge } from '@/components/atoms/Badge/Badge';
+import { Divider } from '@/components/atoms/Divider/Divider';
+import { LogoutButton } from '@/components/atoms/LogoutButton/LogoutButton';
+import { NavigationItem } from '@/components/atoms/NavigationItem/NavigationItem';
+import { Dropdown } from '@/components/molecules/Dropdown/Dropdown';
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { ProfileIcon } from "@/icons"
import { HttpTypes } from "@medusajs/types"
diff --git a/apps/storefront/src/components/molecules/Accordion/Accordion.tsx b/apps/storefront/src/components/molecules/Accordion/Accordion.tsx
index 0ea3f3f3c..d20f85f58 100644
--- a/apps/storefront/src/components/molecules/Accordion/Accordion.tsx
+++ b/apps/storefront/src/components/molecules/Accordion/Accordion.tsx
@@ -1,5 +1,5 @@
"use client"
-import { Card } from "@/components/atoms"
+import { Card } from '@/components/atoms/Card/Card';
import { CollapseIcon } from "@/icons"
import { cn } from "@/lib/utils"
import { useEffect, useRef, useState } from "react"
diff --git a/apps/storefront/src/components/molecules/ActiveCategory/ActiveCategory.tsx b/apps/storefront/src/components/molecules/ActiveCategory/ActiveCategory.tsx
new file mode 100644
index 000000000..5a8462071
--- /dev/null
+++ b/apps/storefront/src/components/molecules/ActiveCategory/ActiveCategory.tsx
@@ -0,0 +1,25 @@
+"use client"
+
+import { useParams } from "next/navigation"
+import { ReactNode, Suspense } from "react"
+
+// useParams() suspends while a route below has unknown params, so the nav renders
+// its fallback (nothing highlighted) in the static shell and highlights on load.
+export function ActiveCategory({
+ children,
+ fallback,
+}: {
+ children: (category?: string) => ReactNode
+ fallback: ReactNode
+}) {
+ return (
+ <Suspense fallback={fallback}>
+ <ResolvedCategory render={children} />
+ </Suspense>
+ )
+}
+
+function ResolvedCategory({ render }: { render: (category?: string) => ReactNode }) {
+ const { category } = useParams<{ category?: string }>()
+ return render(category)
+}
diff --git a/apps/storefront/src/components/molecules/AddressForm/AddressForm.tsx b/apps/storefront/src/components/molecules/AddressForm/AddressForm.tsx
index ac58eab66..3c5d38878 100644
--- a/apps/storefront/src/components/molecules/AddressForm/AddressForm.tsx
+++ b/apps/storefront/src/components/molecules/AddressForm/AddressForm.tsx
@@ -6,8 +6,8 @@ import { zodResolver } from '@hookform/resolvers/zod';
import { HttpTypes } from '@medusajs/types';
import { FieldError, FieldValues, FormProvider, useForm, useFormContext } from 'react-hook-form';
-import { Button } from '@/components/atoms';
-import { LabeledInput } from '@/components/cells';
+import { Button } from '@/components/atoms/Button/Button';
+import { LabeledInput } from '@/components/cells/LabeledInput/LabeledInput';
import CountrySelect from '@/components/cells/CountrySelect/CountrySelect';
import { addCustomerAddress, updateCustomerAddress } from '@/lib/data/customer';
diff --git a/apps/storefront/src/components/molecules/CategoryNavbar/CategoryNavbar.tsx b/apps/storefront/src/components/molecules/CategoryNavbar/CategoryNavbar.tsx
index 7bf7c5463..fbc4744ac 100644
--- a/apps/storefront/src/components/molecules/CategoryNavbar/CategoryNavbar.tsx
+++ b/apps/storefront/src/components/molecules/CategoryNavbar/CategoryNavbar.tsx
@@ -2,7 +2,7 @@
import { HttpTypes } from "@medusajs/types"
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { cn } from "@/lib/utils"
-import { useParams } from "next/navigation"
+import { ActiveCategory } from "@/components/molecules/ActiveCategory/ActiveCategory"
import { CollapseIcon } from "@/icons"
import { useMemo } from "react"
import {
@@ -19,13 +19,12 @@ interface CategoryNavbarProps {
onClose?: (state: boolean) => void
}
-export const CategoryNavbar = ({
+const CategoryNavbarView = ({
+ category,
categories,
parentCategories = [],
onClose,
-}: CategoryNavbarProps) => {
- const { category } = useParams<{ category?: string }>()
-
+}: CategoryNavbarProps & { category?: string }) => {
const {
hoveredCategoryId,
isDropdownVisible,
@@ -152,3 +151,9 @@ export const CategoryNavbar = ({
</>
)
}
+
+export const CategoryNavbar = (props: CategoryNavbarProps) => (
+ <ActiveCategory fallback={<CategoryNavbarView {...props} />}>
+ {(category) => <CategoryNavbarView {...props} category={category} />}
+ </ActiveCategory>
+)
diff --git a/apps/storefront/src/components/molecules/CountrySelector/CountrySelector.tsx b/apps/storefront/src/components/molecules/CountrySelector/CountrySelector.tsx
index e0097290a..e2bee2fd8 100644
--- a/apps/storefront/src/components/molecules/CountrySelector/CountrySelector.tsx
+++ b/apps/storefront/src/components/molecules/CountrySelector/CountrySelector.tsx
@@ -10,9 +10,10 @@ import {
import { Fragment, useEffect, useMemo, useState } from "react"
import ReactCountryFlag from "react-country-flag"
-import { useParams, usePathname, useRouter } from "next/navigation"
+import { useRouter } from "next/navigation"
import { HttpTypes } from "@medusajs/types"
+import { useLocale } from "@/components/providers/Locale/LocaleProvider"
import { updateRegionWithValidation } from "@/lib/data/cart"
import { Label } from "@medusajs/ui"
import { toast } from "@/lib/helpers/toast"
@@ -33,9 +34,8 @@ const CountrySelect = ({ regions }: CountrySelectProps) => {
| undefined
>(undefined)
- const { locale: countryCode } = useParams()
+ const countryCode = useLocale()
const router = useRouter()
- const currentPath = usePathname().split(`/${countryCode}`)[1]
const options = useMemo(() => {
return regions
@@ -59,6 +59,7 @@ const CountrySelect = ({ regions }: CountrySelectProps) => {
const handleChange = async (option: CountryOption) => {
try {
+ const currentPath = window.location.pathname.split(`/${countryCode}`)[1] ?? ""
const result = await updateRegionWithValidation(option.country, currentPath)
if (result.removedItems.length > 0) {
diff --git a/apps/storefront/src/components/molecules/DeleteCartItemButton/DeleteCartItemButton.tsx b/apps/storefront/src/components/molecules/DeleteCartItemButton/DeleteCartItemButton.tsx
index 20527416c..0fe433571 100644
--- a/apps/storefront/src/components/molecules/DeleteCartItemButton/DeleteCartItemButton.tsx
+++ b/apps/storefront/src/components/molecules/DeleteCartItemButton/DeleteCartItemButton.tsx
@@ -1,6 +1,6 @@
"use client"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import { BinIcon } from "@/icons"
import { useCartContext } from "@/components/providers"
import { toast } from "@/lib/helpers/toast"
diff --git a/apps/storefront/src/components/molecules/FilterCheckboxOption/FilterCheckboxOption.tsx b/apps/storefront/src/components/molecules/FilterCheckboxOption/FilterCheckboxOption.tsx
index f39c97913..a3ccdce82 100644
--- a/apps/storefront/src/components/molecules/FilterCheckboxOption/FilterCheckboxOption.tsx
+++ b/apps/storefront/src/components/molecules/FilterCheckboxOption/FilterCheckboxOption.tsx
@@ -1,4 +1,4 @@
-import { Checkbox } from '@/components/atoms';
+import { Checkbox } from '@/components/atoms/Checkbox/Checkbox';
import { cn } from '@/lib/utils';
export const FilterCheckboxOption = ({
diff --git a/apps/storefront/src/components/molecules/ForgotPasswordForm/ForgotPasswordForm.tsx b/apps/storefront/src/components/molecules/ForgotPasswordForm/ForgotPasswordForm.tsx
index d4d1d7231..1518a79ca 100644
--- a/apps/storefront/src/components/molecules/ForgotPasswordForm/ForgotPasswordForm.tsx
+++ b/apps/storefront/src/components/molecules/ForgotPasswordForm/ForgotPasswordForm.tsx
@@ -7,8 +7,8 @@ import { ClientError } from '@mercurjs/client';
import Link from 'next/link';
import { FieldError, FormProvider, useForm, useFormContext } from 'react-hook-form';
-import { Button } from '@/components/atoms';
-import { LabeledInput } from '@/components/cells';
+import { Button } from '@/components/atoms/Button/Button';
+import { LabeledInput } from '@/components/cells/LabeledInput/LabeledInput';
import { sendResetPasswordEmail } from '@/lib/data/customer';
import { toast } from '@/lib/helpers/toast';
diff --git a/apps/storefront/src/components/molecules/HeaderCategoryNavbar/HeaderCategoryNavbar.tsx b/apps/storefront/src/components/molecules/HeaderCategoryNavbar/HeaderCategoryNavbar.tsx
index 73eafc474..61fe33e6a 100644
--- a/apps/storefront/src/components/molecules/HeaderCategoryNavbar/HeaderCategoryNavbar.tsx
+++ b/apps/storefront/src/components/molecules/HeaderCategoryNavbar/HeaderCategoryNavbar.tsx
@@ -2,12 +2,13 @@
import { HttpTypes } from "@medusajs/types"
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { cn } from "@/lib/utils"
-import { Button } from "@/components/atoms"
-import { useParams } from "next/navigation"
+import { Button } from '@/components/atoms/Button/Button';
+import { ActiveCategory } from "@/components/molecules/ActiveCategory/ActiveCategory"
import { useMemo } from "react"
import { getActiveParentHandle } from "@/lib/helpers/category-utils"
-export const HeaderCategoryNavbar = ({
+const HeaderCategoryNavbarView = ({
+ category,
parentCategories,
categories,
onClose,
@@ -15,9 +16,7 @@ export const HeaderCategoryNavbar = ({
parentCategories: HttpTypes.StoreProductCategory[]
categories: HttpTypes.StoreProductCategory[]
onClose?: (state: boolean) => void
-}) => {
- const { category } = useParams<{ category?: string }>()
-
+} & { category?: string }) => {
const activeParentHandle = useMemo(
() => getActiveParentHandle(category, categories, parentCategories),
[category, categories, parentCategories]
@@ -47,3 +46,13 @@ export const HeaderCategoryNavbar = ({
</nav>
)
}
+
+export const HeaderCategoryNavbar = (props: {
+ parentCategories: HttpTypes.StoreProductCategory[]
+ categories: HttpTypes.StoreProductCategory[]
+ onClose?: (state: boolean) => void
+}) => (
+ <ActiveCategory fallback={<HeaderCategoryNavbarView {...props} />}>
+ {(category) => <HeaderCategoryNavbarView {...props} category={category} />}
+ </ActiveCategory>
+)
diff --git a/apps/storefront/src/components/molecules/LocalizedLink/LocalizedLink.tsx b/apps/storefront/src/components/molecules/LocalizedLink/LocalizedLink.tsx
index 0dd12e79f..69a3038e0 100644
--- a/apps/storefront/src/components/molecules/LocalizedLink/LocalizedLink.tsx
+++ b/apps/storefront/src/components/molecules/LocalizedLink/LocalizedLink.tsx
@@ -1,7 +1,8 @@
"use client"
import Link from "next/link"
-import { useParams, usePathname } from "next/navigation"
+
+import { useLocale } from "@/components/providers/Locale/LocaleProvider"
import React, { MouseEventHandler } from "react"
/**
@@ -20,10 +21,7 @@ const LocalizedClientLink = ({
passHref?: true
[x: string]: any
}) => {
- const params = useParams()
- const pathname = usePathname()
-
- const locale = params?.locale || pathname?.split('/')[1] || 'en'
+ const locale = useLocale()
return (
<Link href={`/${locale}${href}`} {...props}>
diff --git a/apps/storefront/src/components/molecules/LoginForm/LoginForm.tsx b/apps/storefront/src/components/molecules/LoginForm/LoginForm.tsx
index 8f5a76ffb..2bc8a02db 100644
--- a/apps/storefront/src/components/molecules/LoginForm/LoginForm.tsx
+++ b/apps/storefront/src/components/molecules/LoginForm/LoginForm.tsx
@@ -7,9 +7,9 @@ import Link from 'next/link';
import { useRouter, useSearchParams } from 'next/navigation';
import { FieldError, FieldValues, FormProvider, useForm, useFormContext } from 'react-hook-form';
-import { Button } from '@/components/atoms';
+import { Button } from '@/components/atoms/Button/Button';
import { Alert } from '@/components/atoms/Alert/Alert';
-import { LabeledInput } from '@/components/cells';
+import { LabeledInput } from '@/components/cells/LabeledInput/LabeledInput';
import { login, transferCart } from '@/lib/data/customer';
import { toast } from '@/lib/helpers/toast';
diff --git a/apps/storefront/src/components/molecules/MessageButton/MessageButton.tsx b/apps/storefront/src/components/molecules/MessageButton/MessageButton.tsx
index 7b512ca8a..812c584e3 100644
--- a/apps/storefront/src/components/molecules/MessageButton/MessageButton.tsx
+++ b/apps/storefront/src/components/molecules/MessageButton/MessageButton.tsx
@@ -1,6 +1,6 @@
"use client"
-import { Badge } from "@/components/atoms"
+import { Badge } from '@/components/atoms/Badge/Badge';
import { MessageIcon } from "@/icons"
import LocalizedClientLink from "../LocalizedLink/LocalizedLink"
import { useUnreads } from "@talkjs/react"
diff --git a/apps/storefront/src/components/molecules/NavbarSearch/NavbarSearch.tsx b/apps/storefront/src/components/molecules/NavbarSearch/NavbarSearch.tsx
index 54d3ddcef..eff0924e0 100644
--- a/apps/storefront/src/components/molecules/NavbarSearch/NavbarSearch.tsx
+++ b/apps/storefront/src/components/molecules/NavbarSearch/NavbarSearch.tsx
@@ -1,9 +1,9 @@
"use client"
-import { Input } from "@/components/atoms"
+import { Input } from '@/components/atoms/Input/Input';
import { SearchIcon } from "@/icons"
import { useSearchParams } from "next/navigation"
-import { useState } from "react"
+import { Suspense, useState } from "react"
import { redirect } from "next/navigation"
import clsx from "clsx"
@@ -11,10 +11,19 @@ interface Props {
className?: string
}
-export const NavbarSearch = ({ className }: Props) => {
+export const NavbarSearch = ({ className }: Props) => (
+ <Suspense fallback={<NavbarSearchForm className={className} initialQuery="" />}>
+ <NavbarSearchWithQuery className={className} />
+ </Suspense>
+)
+
+const NavbarSearchWithQuery = ({ className }: Props) => {
const searchParams = useSearchParams()
+ return <NavbarSearchForm className={className} initialQuery={searchParams.get("query") || ""} />
+}
- const [search, setSearch] = useState(searchParams.get("query") || "")
+const NavbarSearchForm = ({ className, initialQuery }: Props & { initialQuery: string }) => {
+ const [search, setSearch] = useState(initialQuery)
const handleSearch = () => {
if (search) {
diff --git a/apps/storefront/src/components/molecules/OrderParcelItems/OrderParcelItems.tsx b/apps/storefront/src/components/molecules/OrderParcelItems/OrderParcelItems.tsx
index 6ebb9c28c..3c86f468f 100644
--- a/apps/storefront/src/components/molecules/OrderParcelItems/OrderParcelItems.tsx
+++ b/apps/storefront/src/components/molecules/OrderParcelItems/OrderParcelItems.tsx
@@ -1,4 +1,4 @@
-import { OrderProductListItem } from "@/components/cells"
+import { OrderProductListItem } from '@/components/cells/OrderProductListItem/OrderProductListItem';
export const OrderParcelItems = ({
items,
diff --git a/apps/storefront/src/components/molecules/ParcelAccordion/ParcelAccordion.tsx b/apps/storefront/src/components/molecules/ParcelAccordion/ParcelAccordion.tsx
index 0ea449a96..9506115e6 100644
--- a/apps/storefront/src/components/molecules/ParcelAccordion/ParcelAccordion.tsx
+++ b/apps/storefront/src/components/molecules/ParcelAccordion/ParcelAccordion.tsx
@@ -1,6 +1,6 @@
import { format } from 'date-fns';
-import { Button } from '@/components/atoms';
+import { Button } from '@/components/atoms/Button/Button';
import LocalizedClientLink from '@/components/molecules/LocalizedLink/LocalizedLink';
import { convertToLocale } from '@/lib/helpers/money';
diff --git a/apps/storefront/src/components/molecules/ParcelAccordion/ParcelAccordionItems.tsx b/apps/storefront/src/components/molecules/ParcelAccordion/ParcelAccordionItems.tsx
index 3293ad37e..39ffcb134 100644
--- a/apps/storefront/src/components/molecules/ParcelAccordion/ParcelAccordionItems.tsx
+++ b/apps/storefront/src/components/molecules/ParcelAccordion/ParcelAccordionItems.tsx
@@ -2,8 +2,8 @@
import { useEffect, useRef, useState } from 'react';
-import { Card } from '@/components/atoms';
-import { OrderProductListItem } from '@/components/cells';
+import { Card } from '@/components/atoms/Card/Card';
+import { OrderProductListItem } from '@/components/cells/OrderProductListItem/OrderProductListItem';
import { CollapseIcon } from '@/icons';
import { convertToLocale } from '@/lib/helpers/money';
import { parcelStatuses, steps } from '@/lib/helpers/parcel-statuses';
diff --git a/apps/storefront/src/components/molecules/ParentCategoryLinks/ParentCategoryLinks.tsx b/apps/storefront/src/components/molecules/ParentCategoryLinks/ParentCategoryLinks.tsx
index ebc7fa774..6bee0401f 100644
--- a/apps/storefront/src/components/molecules/ParentCategoryLinks/ParentCategoryLinks.tsx
+++ b/apps/storefront/src/components/molecules/ParentCategoryLinks/ParentCategoryLinks.tsx
@@ -2,7 +2,7 @@
import { HttpTypes } from "@medusajs/types"
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { cn } from "@/lib/utils"
-import { useParams } from "next/navigation"
+import { ActiveCategory } from "@/components/molecules/ActiveCategory/ActiveCategory"
import { useMemo } from "react"
import { getActiveParentHandle } from "@/lib/helpers/category-utils"
@@ -11,12 +11,11 @@ interface ParentCategoryLinksProps {
categories: HttpTypes.StoreProductCategory[]
}
-export const ParentCategoryLinks = ({
+const ParentCategoryLinksView = ({
+ category,
parentCategories,
categories,
-}: ParentCategoryLinksProps) => {
- const { category } = useParams<{ category?: string }>()
-
+}: ParentCategoryLinksProps & { category?: string }) => {
const activeParentHandle = useMemo(
() => getActiveParentHandle(category, categories, parentCategories),
[category, categories, parentCategories]
@@ -46,3 +45,9 @@ export const ParentCategoryLinks = ({
</nav>
)
}
+
+export const ParentCategoryLinks = (props: ParentCategoryLinksProps) => (
+ <ActiveCategory fallback={<ParentCategoryLinksView {...props} />}>
+ {(category) => <ParentCategoryLinksView {...props} category={category} />}
+ </ActiveCategory>
+)
diff --git a/apps/storefront/src/components/molecules/PrimeCategoryNavbar/PrimeCategoryNavbar.tsx b/apps/storefront/src/components/molecules/PrimeCategoryNavbar/PrimeCategoryNavbar.tsx
index f2e522d30..1467674fb 100644
--- a/apps/storefront/src/components/molecules/PrimeCategoryNavbar/PrimeCategoryNavbar.tsx
+++ b/apps/storefront/src/components/molecules/PrimeCategoryNavbar/PrimeCategoryNavbar.tsx
@@ -1,12 +1,10 @@
"use client"
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { cn } from "@/lib/utils"
-import { useParams } from "next/navigation"
+import { ActiveCategory } from "@/components/molecules/ActiveCategory/ActiveCategory"
import { primeCategories } from "@/data/categories"
-export const PrimeCategoryNavbar = () => {
- const { category } = useParams()
-
+const PrimeCategoryNavbarView = ({ category }: { category?: string }) => {
return (
<div className="flex items-center gap-2">
{Object.keys(primeCategories).map((key: string) => (
@@ -24,3 +22,9 @@ export const PrimeCategoryNavbar = () => {
</div>
)
}
+
+export const PrimeCategoryNavbar = () => (
+ <ActiveCategory fallback={<PrimeCategoryNavbarView />}>
+ {(category) => <PrimeCategoryNavbarView category={category} />}
+ </ActiveCategory>
+)
diff --git a/apps/storefront/src/components/molecules/ProductCarouselIndicator/ProductCarouselIndicator.tsx b/apps/storefront/src/components/molecules/ProductCarouselIndicator/ProductCarouselIndicator.tsx
index 9cc054aa4..e45c610af 100644
--- a/apps/storefront/src/components/molecules/ProductCarouselIndicator/ProductCarouselIndicator.tsx
+++ b/apps/storefront/src/components/molecules/ProductCarouselIndicator/ProductCarouselIndicator.tsx
@@ -4,7 +4,7 @@ import { HttpTypes } from "@medusajs/types"
import { EmblaCarouselType } from "embla-carousel"
import { useCallback, useEffect, useState } from "react"
import { cn } from "@/lib/utils"
-import { Indicator } from "@/components/atoms"
+import { Indicator } from '@/components/atoms/Indicator/Indicator';
import useEmblaCarousel from "embla-carousel-react"
export const ProductCarouselIndicator = ({
diff --git a/apps/storefront/src/components/molecules/ProductListingProductsView/ProductListingProductsView.tsx b/apps/storefront/src/components/molecules/ProductListingProductsView/ProductListingProductsView.tsx
index ebab683f3..63bdc30e0 100644
--- a/apps/storefront/src/components/molecules/ProductListingProductsView/ProductListingProductsView.tsx
+++ b/apps/storefront/src/components/molecules/ProductListingProductsView/ProductListingProductsView.tsx
@@ -1,5 +1,5 @@
import { HttpTypes } from "@medusajs/types"
-import { ProductCard } from "@/components/organisms"
+import { ProductCard } from '@/components/organisms/ProductCard/ProductCard';
interface Props {
products: HttpTypes.StoreProduct[]
diff --git a/apps/storefront/src/components/molecules/ProductPageAccordion/ProductPageAccordion.tsx b/apps/storefront/src/components/molecules/ProductPageAccordion/ProductPageAccordion.tsx
index 938fa3161..5572ad6dc 100644
--- a/apps/storefront/src/components/molecules/ProductPageAccordion/ProductPageAccordion.tsx
+++ b/apps/storefront/src/components/molecules/ProductPageAccordion/ProductPageAccordion.tsx
@@ -1,5 +1,5 @@
'use client';
-import { Card } from '@/components/atoms';
+import { Card } from '@/components/atoms/Card/Card';
import { MinusThinIcon } from '@/icons';
import { cn } from '@/lib/utils';
import { useEffect, useRef, useState } from 'react';
diff --git a/apps/storefront/src/components/molecules/ProductReportButton/ProductReportButton.tsx b/apps/storefront/src/components/molecules/ProductReportButton/ProductReportButton.tsx
index fffae70a2..6a34e0156 100644
--- a/apps/storefront/src/components/molecules/ProductReportButton/ProductReportButton.tsx
+++ b/apps/storefront/src/components/molecules/ProductReportButton/ProductReportButton.tsx
@@ -1,6 +1,6 @@
'use client';
-import { Button } from '@/components/atoms';
+import { Button } from '@/components/atoms/Button/Button';
import { useState } from 'react';
import { Modal } from '../Modal/Modal';
import { ReportListingForm } from '../ReportListingForm/ReportListingForm';
diff --git a/apps/storefront/src/components/molecules/ProductTags/ProductTags.tsx b/apps/storefront/src/components/molecules/ProductTags/ProductTags.tsx
index 87415e7e8..c92554f1b 100644
--- a/apps/storefront/src/components/molecules/ProductTags/ProductTags.tsx
+++ b/apps/storefront/src/components/molecules/ProductTags/ProductTags.tsx
@@ -1,4 +1,4 @@
-import { Label } from '@/components/atoms';
+import { Label } from '@/components/atoms/Label/Label';
import { HttpTypes } from '@medusajs/types';
export const ProductTags = ({
diff --git a/apps/storefront/src/components/molecules/ProductVariants/ProductVariants.tsx b/apps/storefront/src/components/molecules/ProductVariants/ProductVariants.tsx
index 25f0fefbb..dc17132a6 100644
--- a/apps/storefront/src/components/molecules/ProductVariants/ProductVariants.tsx
+++ b/apps/storefront/src/components/molecules/ProductVariants/ProductVariants.tsx
@@ -2,7 +2,7 @@
import { HttpTypes } from "@medusajs/types"
-import { Chip } from "@/components/atoms"
+import { Chip } from '@/components/atoms/Chip/Chip';
import useUpdateSearchParams from "@/hooks/useUpdateSearchParams"
export const ProductVariants = ({
diff --git a/apps/storefront/src/components/molecules/ProfileDetails/ProfileDetails.tsx b/apps/storefront/src/components/molecules/ProfileDetails/ProfileDetails.tsx
index c66955e79..5d63bb532 100644
--- a/apps/storefront/src/components/molecules/ProfileDetails/ProfileDetails.tsx
+++ b/apps/storefront/src/components/molecules/ProfileDetails/ProfileDetails.tsx
@@ -1,5 +1,6 @@
"use client"
-import { Button, Card } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
+import { Card } from '@/components/atoms/Card/Card';
import { HttpTypes } from "@medusajs/types"
import { Modal } from "../Modal/Modal"
import { useState } from "react"
diff --git a/apps/storefront/src/components/molecules/ProfileDetails/ProfilePassword.tsx b/apps/storefront/src/components/molecules/ProfileDetails/ProfilePassword.tsx
index 143aeced0..d4ae4c625 100644
--- a/apps/storefront/src/components/molecules/ProfileDetails/ProfilePassword.tsx
+++ b/apps/storefront/src/components/molecules/ProfileDetails/ProfilePassword.tsx
@@ -1,6 +1,6 @@
"use client"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import { Card } from "@/components/atoms/Card/Card"
import { InfoIcon } from "@/icons"
import { Divider, Heading } from "@medusajs/ui"
diff --git a/apps/storefront/src/components/molecules/ProfileDetailsForm/ProfileDetailsForm.tsx b/apps/storefront/src/components/molecules/ProfileDetailsForm/ProfileDetailsForm.tsx
index c07316f16..5734ec89e 100644
--- a/apps/storefront/src/components/molecules/ProfileDetailsForm/ProfileDetailsForm.tsx
+++ b/apps/storefront/src/components/molecules/ProfileDetailsForm/ProfileDetailsForm.tsx
@@ -6,8 +6,8 @@ import { zodResolver } from '@hookform/resolvers/zod';
import { HttpTypes } from '@medusajs/types';
import { FieldError, FieldValues, FormProvider, useForm, useFormContext } from 'react-hook-form';
-import { Button } from '@/components/atoms';
-import { LabeledInput } from '@/components/cells';
+import { Button } from '@/components/atoms/Button/Button';
+import { LabeledInput } from '@/components/cells/LabeledInput/LabeledInput';
import { updateCustomer } from '@/lib/data/customer';
import { ProfileDetailsFormData, profileDetailsSchema } from './schema';
diff --git a/apps/storefront/src/components/molecules/ProfilePasswordForm/ProfilePasswordForm.tsx b/apps/storefront/src/components/molecules/ProfilePasswordForm/ProfilePasswordForm.tsx
index 5398b37ad..4a426be01 100644
--- a/apps/storefront/src/components/molecules/ProfilePasswordForm/ProfilePasswordForm.tsx
+++ b/apps/storefront/src/components/molecules/ProfilePasswordForm/ProfilePasswordForm.tsx
@@ -1,7 +1,8 @@
"use client"
-import { Button, Card } from "@/components/atoms"
-import { LabeledInput } from "@/components/cells"
+import { Button } from '@/components/atoms/Button/Button';
+import { Card } from '@/components/atoms/Card/Card';
+import { LabeledInput } from '@/components/cells/LabeledInput/LabeledInput';
import { zodResolver } from "@hookform/resolvers/zod"
import {
FieldError,
diff --git a/apps/storefront/src/components/molecules/RegisterForm/RegisterForm.tsx b/apps/storefront/src/components/molecules/RegisterForm/RegisterForm.tsx
index 979423bb6..18a14120b 100644
--- a/apps/storefront/src/components/molecules/RegisterForm/RegisterForm.tsx
+++ b/apps/storefront/src/components/molecules/RegisterForm/RegisterForm.tsx
@@ -6,9 +6,9 @@ import {
useForm,
useFormContext,
} from "react-hook-form"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import { zodResolver } from "@hookform/resolvers/zod"
-import { LabeledInput } from "@/components/cells"
+import { LabeledInput } from '@/components/cells/LabeledInput/LabeledInput';
import { registerFormSchema, RegisterFormData } from "./schema"
import { signup } from "@/lib/data/customer"
import { useState } from "react"
diff --git a/apps/storefront/src/components/molecules/ReportListingForm/ReportListingForm.tsx b/apps/storefront/src/components/molecules/ReportListingForm/ReportListingForm.tsx
index 8151f7cf9..0b0a45562 100644
--- a/apps/storefront/src/components/molecules/ReportListingForm/ReportListingForm.tsx
+++ b/apps/storefront/src/components/molecules/ReportListingForm/ReportListingForm.tsx
@@ -2,7 +2,8 @@
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod';
-import { Button, Textarea } from '@/components/atoms';
+import { Button } from '@/components/atoms/Button/Button';
+import { Textarea } from '@/components/atoms/Textarea/Textarea';
import { SelectField } from '../SelectField/SelectField';
import { cn } from '@/lib/utils';
diff --git a/apps/storefront/src/components/molecules/ReportSellerForm/ReportSellerForm.tsx b/apps/storefront/src/components/molecules/ReportSellerForm/ReportSellerForm.tsx
index 57dfd4e04..c1487a0ba 100644
--- a/apps/storefront/src/components/molecules/ReportSellerForm/ReportSellerForm.tsx
+++ b/apps/storefront/src/components/molecules/ReportSellerForm/ReportSellerForm.tsx
@@ -2,7 +2,8 @@
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod';
-import { Button, Textarea } from '@/components/atoms';
+import { Button } from '@/components/atoms/Button/Button';
+import { Textarea } from '@/components/atoms/Textarea/Textarea';
import { SelectField } from '../SelectField/SelectField';
import { cn } from '@/lib/utils';
diff --git a/apps/storefront/src/components/molecules/RouteFallback/RouteFallback.tsx b/apps/storefront/src/components/molecules/RouteFallback/RouteFallback.tsx
new file mode 100644
index 000000000..2e8a8c49a
--- /dev/null
+++ b/apps/storefront/src/components/molecules/RouteFallback/RouteFallback.tsx
@@ -0,0 +1,3 @@
+export const RouteFallback = () => (
+ <div aria-busy="true" className="container min-h-[60vh]" data-testid="route-loading" />
+)
diff --git a/apps/storefront/src/components/molecules/SellerInfoHeader/SellerInfoHeader.tsx b/apps/storefront/src/components/molecules/SellerInfoHeader/SellerInfoHeader.tsx
index 532c35b9a..bcc763a4d 100644
--- a/apps/storefront/src/components/molecules/SellerInfoHeader/SellerInfoHeader.tsx
+++ b/apps/storefront/src/components/molecules/SellerInfoHeader/SellerInfoHeader.tsx
@@ -1,4 +1,4 @@
-import { StarRating } from "@/components/atoms"
+import { StarRating } from '@/components/atoms/StarRating/StarRating';
import { SellerAvatar } from "@/components/cells/SellerAvatar/SellerAvatar"
import { CollapseIcon } from "@/icons"
import clsx from "clsx"
diff --git a/apps/storefront/src/components/molecules/SellerReview/SellerReview.tsx b/apps/storefront/src/components/molecules/SellerReview/SellerReview.tsx
index a3d127155..d8c1f288b 100644
--- a/apps/storefront/src/components/molecules/SellerReview/SellerReview.tsx
+++ b/apps/storefront/src/components/molecules/SellerReview/SellerReview.tsx
@@ -1,4 +1,4 @@
-import { StarRating } from "@/components/atoms"
+import { StarRating } from '@/components/atoms/StarRating/StarRating';
import { SingleProductReview } from "@/types/product"
import { Divider } from "@medusajs/ui"
import clsx from "clsx"
diff --git a/apps/storefront/src/components/molecules/SellerReviewList/SellerReviewList.tsx b/apps/storefront/src/components/molecules/SellerReviewList/SellerReviewList.tsx
index af6e5f86c..bdc1e2f01 100644
--- a/apps/storefront/src/components/molecules/SellerReviewList/SellerReviewList.tsx
+++ b/apps/storefront/src/components/molecules/SellerReviewList/SellerReviewList.tsx
@@ -1,6 +1,6 @@
"use client"
-import { OrdersPagination } from "@/components/sections"
+import { OrdersPagination } from '@/components/organisms/OrdersPagination/OrdersPagination';
import { SellerReview } from "../SellerReview/SellerReview"
import { useSearchParams } from "next/navigation"
diff --git a/apps/storefront/src/components/molecules/SellerScore/SellerScore.tsx b/apps/storefront/src/components/molecules/SellerScore/SellerScore.tsx
index 62b2307e1..a182d317a 100644
--- a/apps/storefront/src/components/molecules/SellerScore/SellerScore.tsx
+++ b/apps/storefront/src/components/molecules/SellerScore/SellerScore.tsx
@@ -1,4 +1,4 @@
-import { StarRating } from "@/components/atoms"
+import { StarRating } from '@/components/atoms/StarRating/StarRating';
export const SellerScore = ({
rate,
diff --git a/apps/storefront/src/components/molecules/TabsList/TabsList.tsx b/apps/storefront/src/components/molecules/TabsList/TabsList.tsx
index 012788108..9721e6519 100644
--- a/apps/storefront/src/components/molecules/TabsList/TabsList.tsx
+++ b/apps/storefront/src/components/molecules/TabsList/TabsList.tsx
@@ -1,4 +1,4 @@
-import { TabsTrigger } from "@/components/atoms"
+import { TabsTrigger } from '@/components/atoms/TabsTrigger/TabsTrigger';
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
export const TabsList = ({
diff --git a/apps/storefront/src/components/molecules/UserNavigation/UserNavigation.tsx b/apps/storefront/src/components/molecules/UserNavigation/UserNavigation.tsx
index 49aa7f4fe..9079dbb79 100644
--- a/apps/storefront/src/components/molecules/UserNavigation/UserNavigation.tsx
+++ b/apps/storefront/src/components/molecules/UserNavigation/UserNavigation.tsx
@@ -1,11 +1,9 @@
"use client"
-import {
- Badge,
- Card,
- Divider,
- LogoutButton,
- NavigationItem,
-} from "@/components/atoms"
+import { Badge } from '@/components/atoms/Badge/Badge';
+import { Card } from '@/components/atoms/Card/Card';
+import { Divider } from '@/components/atoms/Divider/Divider';
+import { LogoutButton } from '@/components/atoms/LogoutButton/LogoutButton';
+import { NavigationItem } from '@/components/atoms/NavigationItem/NavigationItem';
import { useUnreads } from "@talkjs/react"
import { usePathname } from "next/navigation"
diff --git a/apps/storefront/src/components/organisms/Addressess/Addresses.tsx b/apps/storefront/src/components/organisms/Addressess/Addresses.tsx
index a503d2706..26197cfbc 100644
--- a/apps/storefront/src/components/organisms/Addressess/Addresses.tsx
+++ b/apps/storefront/src/components/organisms/Addressess/Addresses.tsx
@@ -1,6 +1,8 @@
"use client"
-import { Button, Card } from "@/components/atoms"
-import { AddressForm, Modal } from "@/components/molecules"
+import { Button } from '@/components/atoms/Button/Button';
+import { Card } from '@/components/atoms/Card/Card';
+import { AddressForm } from '@/components/molecules/AddressForm/AddressForm';
+import { Modal } from '@/components/molecules/Modal/Modal';
import { emptyDefaultAddressValues } from "@/components/molecules/AddressForm/AddressForm"
import { AddressFormData } from "@/components/molecules/AddressForm/schema"
import { deleteCustomerAddress } from "@/lib/data/customer"
diff --git a/apps/storefront/src/components/organisms/CartEmpty/CartEmpty.tsx b/apps/storefront/src/components/organisms/CartEmpty/CartEmpty.tsx
index 2f818cda3..2eb860cbd 100644
--- a/apps/storefront/src/components/organisms/CartEmpty/CartEmpty.tsx
+++ b/apps/storefront/src/components/organisms/CartEmpty/CartEmpty.tsx
@@ -1,4 +1,4 @@
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
export function CartEmpty() {
diff --git a/apps/storefront/src/components/organisms/CartItems/CartItems.tsx b/apps/storefront/src/components/organisms/CartItems/CartItems.tsx
index 31e70d5b6..37e2a8ae8 100644
--- a/apps/storefront/src/components/organisms/CartItems/CartItems.tsx
+++ b/apps/storefront/src/components/organisms/CartItems/CartItems.tsx
@@ -1,17 +1,15 @@
-import {
- CartItemsFooter,
- CartItemsHeader,
- CartItemsProducts,
-} from "@/components/cells"
+import { CartItemsFooter } from '@/components/cells/CartItemsFooter/CartItemsFooter';
+import { CartItemsHeader } from '@/components/cells/CartItemsHeader/CartItemsHeader';
+import { CartItemsProducts } from '@/components/cells/CartItemsProducts/CartItemsProducts';
import { HttpTypes } from "@medusajs/types"
-import { EmptyCart } from "./EmptyCart"
+import { CartEmpty } from "@/components/organisms/CartEmpty/CartEmpty"
export const CartItems = ({ cart }: { cart: HttpTypes.StoreCart | null }) => {
if (!cart) return null
const groupedItems: any = groupItemsBySeller(cart)
- if (!Object.keys(groupedItems).length) return <EmptyCart />
+ if (!Object.keys(groupedItems).length) return <CartEmpty />
return Object.keys(groupedItems).map((key) => (
<div key={key} className="mb-4" data-testid={`cart-items-seller-${key}`}>
diff --git a/apps/storefront/src/components/organisms/CartItems/EmptyCart.tsx b/apps/storefront/src/components/organisms/CartItems/EmptyCart.tsx
deleted file mode 100644
index f5861e17b..000000000
--- a/apps/storefront/src/components/organisms/CartItems/EmptyCart.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Button } from '@/components/atoms';
-import { Carousel } from '@/components/cells';
-import LocalizedClientLink from '@/components/molecules/LocalizedLink/LocalizedLink';
-import { CategoryCard } from '@/components/organisms';
-import { listCategories } from '@/lib/data/categories';
-
-export const EmptyCart = async () => {
- const { categories } = await listCategories();
-
- return (
- <div>
- <div
- className="mb-16 flex h-full w-full flex-col items-center justify-center py-4 md:mx-auto md:w-[426px]"
- data-testid="empty-cart"
- >
- <h4 className="heading-md text-center uppercase text-primary">Shopping cart</h4>
- <p className="py-2 text-center text-lg">Your shopping cart is currently empty.</p>
- <LocalizedClientLink
- href="/categories"
- className="mt-6 w-full"
- >
- <Button className="w-full py-3 uppercase md:px-24">Explore</Button>
- </LocalizedClientLink>
- </div>
- <Carousel
- items={categories?.map(category => (
- <CategoryCard
- key={category.id}
- category={category}
- />
- ))}
- />
- </div>
- );
-};
diff --git a/apps/storefront/src/components/organisms/Chat/Chat.tsx b/apps/storefront/src/components/organisms/Chat/Chat.tsx
index 49ce2dd57..30b33bef5 100644
--- a/apps/storefront/src/components/organisms/Chat/Chat.tsx
+++ b/apps/storefront/src/components/organisms/Chat/Chat.tsx
@@ -4,9 +4,9 @@ import { useState } from 'react';
import { HttpTypes } from '@medusajs/types';
-import { Button } from '@/components/atoms';
+import { Button } from '@/components/atoms/Button/Button';
import { ChatBox } from '@/components/cells/ChatBox/ChatBox';
-import { Modal } from '@/components/molecules';
+import { Modal } from '@/components/molecules/Modal/Modal';
import { MessageIcon } from '@/icons';
import { SellerDTO } from '@mercurjs/types';
diff --git a/apps/storefront/src/components/organisms/CompareOffersModal/CompareOffersModal.tsx b/apps/storefront/src/components/organisms/CompareOffersModal/CompareOffersModal.tsx
index 25e063ae5..90d4226f8 100644
--- a/apps/storefront/src/components/organisms/CompareOffersModal/CompareOffersModal.tsx
+++ b/apps/storefront/src/components/organisms/CompareOffersModal/CompareOffersModal.tsx
@@ -1,6 +1,7 @@
"use client"
-import { Badge, Button } from "@/components/atoms"
+import { Badge } from '@/components/atoms/Badge/Badge';
+import { Button } from '@/components/atoms/Button/Button';
import { SellerAvatar } from "@/components/cells/SellerAvatar/SellerAvatar"
import { Modal } from "@/components/molecules/Modal/Modal"
import { useCartContext } from "@/components/providers"
diff --git a/apps/storefront/src/components/organisms/GalleryCarousel/GalleryCarousel.tsx b/apps/storefront/src/components/organisms/GalleryCarousel/GalleryCarousel.tsx
index 85898bfc7..f066dc7a0 100644
--- a/apps/storefront/src/components/organisms/GalleryCarousel/GalleryCarousel.tsx
+++ b/apps/storefront/src/components/organisms/GalleryCarousel/GalleryCarousel.tsx
@@ -1,4 +1,4 @@
-import { ProductCarousel } from '@/components/cells';
+import { ProductCarousel } from '@/components/cells/ProductCarousel/ProductCarousel';
import { HttpTypes } from '@medusajs/types';
export const GalleryCarousel = ({
diff --git a/apps/storefront/src/components/organisms/Header/Header.tsx b/apps/storefront/src/components/organisms/Header/Header.tsx
index d19011fa0..a39755e62 100644
--- a/apps/storefront/src/components/organisms/Header/Header.tsx
+++ b/apps/storefront/src/components/organisms/Header/Header.tsx
@@ -2,29 +2,25 @@ import Image from "next/image"
import { Suspense } from "react"
import { HttpTypes } from "@medusajs/types"
-import { CartButton, MobileNavbar, Navbar } from "@/components/cells"
+import { CartButton } from '@/components/cells/CartButton/CartButton';
+import { MobileNavbar } from '@/components/cells/MobileNavbar/MobileNavbar';
+import { Navbar } from '@/components/cells/Navbar/Navbar';
import { CartIcon } from "@/icons"
-import { UserDropdown } from "@/components/cells/UserDropdown/UserDropdown"
import CountrySelector from "@/components/molecules/CountrySelector/CountrySelector"
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
-import { MessageButton } from "@/components/molecules/MessageButton/MessageButton"
import { listCategories } from "@/lib/data/categories"
import { listRegions } from "@/lib/data/regions"
-import { retrieveCustomer } from "@/lib/data/customer"
import { ParentCategoryLinks } from "@/components/molecules/ParentCategoryLinks/ParentCategoryLinks"
+import { HeaderAccount, HeaderAccountFallback } from "./HeaderAccount"
-export const Header = async ({ locale } : {
- locale: string
-}) => {
- const [user, regions, { categories, parentCategories }] = await Promise.all([
- retrieveCustomer().catch(() => null),
+export const Header = async () => {
+ const [regions, { categories, parentCategories }] = await Promise.all([
listRegions(),
listCategories({ query: { include_ancestors_tree: true } }) as Promise<{
categories: HttpTypes.StoreProductCategory[]
parentCategories: HttpTypes.StoreProductCategory[]
}>,
])
- const isLoggedIn = Boolean(user)
return (
<header data-testid="header">
<div className="flex py-2 lg:px-8 px-4 md:px-5" data-testid="header-top">
@@ -51,8 +47,9 @@ export const Header = async ({ locale } : {
</div>
<div className="flex items-center justify-end gap-2 lg:gap-4 w-full lg:w-1/3 py-2" data-testid="header-actions">
<CountrySelector regions={regions} />
- {isLoggedIn && <MessageButton />}
- <UserDropdown isLoggedIn={isLoggedIn} />
+ <Suspense fallback={<HeaderAccountFallback />}>
+ <HeaderAccount />
+ </Suspense>
<Suspense
fallback={
<LocalizedClientLink href="/cart" aria-label="Go to cart" className="flex">
diff --git a/apps/storefront/src/components/organisms/Header/HeaderAccount.tsx b/apps/storefront/src/components/organisms/Header/HeaderAccount.tsx
new file mode 100644
index 000000000..259b602d2
--- /dev/null
+++ b/apps/storefront/src/components/organisms/Header/HeaderAccount.tsx
@@ -0,0 +1,18 @@
+import { UserDropdown } from "@/components/cells/UserDropdown/UserDropdown"
+import { MessageButton } from "@/components/molecules/MessageButton/MessageButton"
+import { CustomerTalkJsProvider } from "@/components/providers/TalkJs/CustomerTalkJsProvider"
+import { retrieveCustomer } from "@/lib/data/customer"
+
+export const HeaderAccount = async () => {
+ const user = await retrieveCustomer().catch(() => null)
+ const isLoggedIn = Boolean(user)
+
+ return (
+ <CustomerTalkJsProvider>
+ {isLoggedIn && <MessageButton />}
+ <UserDropdown isLoggedIn={isLoggedIn} />
+ </CustomerTalkJsProvider>
+ )
+}
+
+export const HeaderAccountFallback = () => <UserDropdown isLoggedIn={false} />
diff --git a/apps/storefront/src/components/organisms/HomeProductsCarousel/HomeProductsCarousel.tsx b/apps/storefront/src/components/organisms/HomeProductsCarousel/HomeProductsCarousel.tsx
index a2899068e..646678d4b 100644
--- a/apps/storefront/src/components/organisms/HomeProductsCarousel/HomeProductsCarousel.tsx
+++ b/apps/storefront/src/components/organisms/HomeProductsCarousel/HomeProductsCarousel.tsx
@@ -1,4 +1,4 @@
-import { Carousel } from "@/components/cells"
+import { CustomCarousel as Carousel } from '@/components/cells/Carousel/Carousel';
import { ProductCard } from "../ProductCard/ProductCard"
import { listProducts } from "@/lib/data/products"
import { Product } from "@/types/product"
diff --git a/apps/storefront/src/components/organisms/OfferCard/OfferCard.tsx b/apps/storefront/src/components/organisms/OfferCard/OfferCard.tsx
index 275b2c38d..030c2fcde 100644
--- a/apps/storefront/src/components/organisms/OfferCard/OfferCard.tsx
+++ b/apps/storefront/src/components/organisms/OfferCard/OfferCard.tsx
@@ -2,7 +2,7 @@
import Image from "next/image"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import { toast } from "@/lib/helpers/toast"
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { useCartContext } from "@/components/providers"
diff --git a/apps/storefront/src/components/organisms/OrderAddresses/OrderAddresses.tsx b/apps/storefront/src/components/organisms/OrderAddresses/OrderAddresses.tsx
index b125a41e0..8c63db52d 100644
--- a/apps/storefront/src/components/organisms/OrderAddresses/OrderAddresses.tsx
+++ b/apps/storefront/src/components/organisms/OrderAddresses/OrderAddresses.tsx
@@ -1,4 +1,4 @@
-import { Card } from "@/components/atoms"
+import { Card } from '@/components/atoms/Card/Card';
export const OrderAddresses = () => {
return <Card>OrderAddresses</Card>
diff --git a/apps/storefront/src/components/organisms/OrderItems/OrderItems.tsx b/apps/storefront/src/components/organisms/OrderItems/OrderItems.tsx
index 6120a0c49..170446460 100644
--- a/apps/storefront/src/components/organisms/OrderItems/OrderItems.tsx
+++ b/apps/storefront/src/components/organisms/OrderItems/OrderItems.tsx
@@ -1,4 +1,4 @@
-import { Divider } from "@/components/atoms"
+import { Divider } from '@/components/atoms/Divider/Divider';
import { HttpTypes } from "@medusajs/types"
import { Table } from "@medusajs/ui"
import { Item } from "./Item"
diff --git a/apps/storefront/src/components/organisms/OrderParcels/OrderParcels.tsx b/apps/storefront/src/components/organisms/OrderParcels/OrderParcels.tsx
index 1cfeda767..1b3fc5fd4 100644
--- a/apps/storefront/src/components/organisms/OrderParcels/OrderParcels.tsx
+++ b/apps/storefront/src/components/organisms/OrderParcels/OrderParcels.tsx
@@ -1,4 +1,4 @@
-import { Avatar } from "@/components/atoms"
+import { Avatar } from '@/components/atoms/Avatar/Avatar';
import { Chat } from "../Chat/Chat"
import { retrieveCustomer } from "@/lib/data/customer"
import { OrderParcelItems } from "@/components/molecules/OrderParcelItems/OrderParcelItems"
diff --git a/apps/storefront/src/components/organisms/OrderTotals/OrderTotals.tsx b/apps/storefront/src/components/organisms/OrderTotals/OrderTotals.tsx
index 460f783a9..7f0746b63 100644
--- a/apps/storefront/src/components/organisms/OrderTotals/OrderTotals.tsx
+++ b/apps/storefront/src/components/organisms/OrderTotals/OrderTotals.tsx
@@ -1,4 +1,5 @@
-import { Card, Divider } from "@/components/atoms"
+import { Card } from '@/components/atoms/Card/Card';
+import { Divider } from '@/components/atoms/Divider/Divider';
import { convertToLocale } from "@/lib/helpers/money"
export const OrderTotals = ({ orderGroup }: { orderGroup: any }) => {
diff --git a/apps/storefront/src/components/organisms/OrdersPagination/OrdersPagination.tsx b/apps/storefront/src/components/organisms/OrdersPagination/OrdersPagination.tsx
index df689f309..323292bc0 100644
--- a/apps/storefront/src/components/organisms/OrdersPagination/OrdersPagination.tsx
+++ b/apps/storefront/src/components/organisms/OrdersPagination/OrdersPagination.tsx
@@ -1,5 +1,5 @@
"use client"
-import { Pagination } from "@/components/cells"
+import { Pagination } from '@/components/cells/Pagination/Pagination';
import { usePagination } from "@/hooks/usePagination"
export const OrdersPagination = ({ pages }: { pages: number }) => {
diff --git a/apps/storefront/src/components/organisms/ProductCard/ProductCard.tsx b/apps/storefront/src/components/organisms/ProductCard/ProductCard.tsx
index 48b58d01d..8a0c3b76e 100644
--- a/apps/storefront/src/components/organisms/ProductCard/ProductCard.tsx
+++ b/apps/storefront/src/components/organisms/ProductCard/ProductCard.tsx
@@ -1,7 +1,7 @@
"use client"
import Image from "next/image"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import { HttpTypes } from "@medusajs/types"
import { cn } from "@/lib/utils"
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
diff --git a/apps/storefront/src/components/organisms/ProductDetails/ProductDetails.tsx b/apps/storefront/src/components/organisms/ProductDetails/ProductDetails.tsx
index 083395e5e..9e25dc949 100644
--- a/apps/storefront/src/components/organisms/ProductDetails/ProductDetails.tsx
+++ b/apps/storefront/src/components/organisms/ProductDetails/ProductDetails.tsx
@@ -1,11 +1,9 @@
-import {
- ProductDetailsFooter,
- ProductDetailsHeader,
- ProductDetailsSeller,
- ProductDetailsShipping,
- ProductPageDetails,
- ProductAdditionalAttributes,
-} from "@/components/cells"
+import { ProductDetailsFooter } from '@/components/cells/ProductDetailsFooter/ProductDetailsFooter';
+import { ProductDetailsHeader } from '@/components/cells/ProductDetailsHeader/ProductDetailsHeader';
+import { ProductDetailsSeller } from '@/components/cells/ProductDetailsSeller/ProductDetailsSeller';
+import { ProductDetailsShipping } from '@/components/cells/ProductDetailsShipping/ProductDetailsShipping';
+import { ProductPageDetails } from '@/components/cells/ProductPageDetails/ProductPageDetails';
+import { ProductAdditionalAttributes } from '@/components/cells/ProductAdditionalAttributes/ProductAdditionalAttributes';
import {
getBuyboxWinner,
diff --git a/apps/storefront/src/components/organisms/ProductGallery/ProductGallery.tsx b/apps/storefront/src/components/organisms/ProductGallery/ProductGallery.tsx
index 95f844f4e..d72d36626 100644
--- a/apps/storefront/src/components/organisms/ProductGallery/ProductGallery.tsx
+++ b/apps/storefront/src/components/organisms/ProductGallery/ProductGallery.tsx
@@ -1,4 +1,4 @@
-import { GalleryCarousel } from '@/components/organisms';
+import { GalleryCarousel } from '@/components/organisms/GalleryCarousel/GalleryCarousel';
import { HttpTypes } from '@medusajs/types';
export const ProductGallery = ({
diff --git a/apps/storefront/src/components/organisms/ProductListingActiveFilters/ProductListingActiveFilters.tsx b/apps/storefront/src/components/organisms/ProductListingActiveFilters/ProductListingActiveFilters.tsx
index c0af3e3b6..24118aa83 100644
--- a/apps/storefront/src/components/organisms/ProductListingActiveFilters/ProductListingActiveFilters.tsx
+++ b/apps/storefront/src/components/organisms/ProductListingActiveFilters/ProductListingActiveFilters.tsx
@@ -1,6 +1,6 @@
"use client"
-import { ActiveFilterElement } from "@/components/cells"
+import { ActiveFilterElement } from '@/components/cells/ActiveFilterElement/ActiveFilterElement';
import useGetAllSearchParams from "@/hooks/useGetAllSearchParams"
export const ProductListingActiveFilters = () => {
diff --git a/apps/storefront/src/components/organisms/ProductListingHeader/ProductListingHeader.tsx b/apps/storefront/src/components/organisms/ProductListingHeader/ProductListingHeader.tsx
index 6f2e79ed8..4ec5d7afb 100644
--- a/apps/storefront/src/components/organisms/ProductListingHeader/ProductListingHeader.tsx
+++ b/apps/storefront/src/components/organisms/ProductListingHeader/ProductListingHeader.tsx
@@ -2,7 +2,7 @@
import { usePathname, useRouter } from 'next/navigation';
-import { SelectField } from '@/components/molecules';
+import { SelectField } from '@/components/molecules/SelectField/SelectField';
const selectOptions = [
{ label: 'Newest', value: 'created_at' },
diff --git a/apps/storefront/src/components/organisms/ProductSearchSidebar/ProductSearchSidebar.tsx b/apps/storefront/src/components/organisms/ProductSearchSidebar/ProductSearchSidebar.tsx
index 60746af24..a6c142c86 100644
--- a/apps/storefront/src/components/organisms/ProductSearchSidebar/ProductSearchSidebar.tsx
+++ b/apps/storefront/src/components/organisms/ProductSearchSidebar/ProductSearchSidebar.tsx
@@ -1,7 +1,11 @@
"use client"
-import { Button, Chip, Input } from "@/components/atoms"
-import { Accordion, FilterCheckboxOption, Modal } from "@/components/molecules"
+import { Button } from '@/components/atoms/Button/Button';
+import { Chip } from '@/components/atoms/Chip/Chip';
+import { Input } from '@/components/atoms/Input/Input';
+import { Accordion } from '@/components/molecules/Accordion/Accordion';
+import { FilterCheckboxOption } from '@/components/molecules/FilterCheckboxOption/FilterCheckboxOption';
+import { Modal } from '@/components/molecules/Modal/Modal';
import useFilters from "@/hooks/useFilters"
import useUpdateSearchParams from "@/hooks/useUpdateSearchParams"
import { cn } from "@/lib/utils"
diff --git a/apps/storefront/src/components/organisms/ProductSidebar/ProductSidebar.tsx b/apps/storefront/src/components/organisms/ProductSidebar/ProductSidebar.tsx
index 45c44d6e3..ca8f814cf 100644
--- a/apps/storefront/src/components/organisms/ProductSidebar/ProductSidebar.tsx
+++ b/apps/storefront/src/components/organisms/ProductSidebar/ProductSidebar.tsx
@@ -2,9 +2,12 @@
import { useState } from 'react';
-import { Button } from '@/components/atoms';
-import { ColorFilter, ConditionFilter, PriceFilter, SizeFilter } from '@/components/cells';
-import { ProductListingActiveFilters } from '@/components/organisms';
+import { Button } from '@/components/atoms/Button/Button';
+import { ColorFilter } from '@/components/cells/ColorFilter/ColorFilter';
+import { ConditionFilter } from '@/components/cells/ConditionFilter/ConditionFilter';
+import { PriceFilter } from '@/components/cells/PriceFilter/PriceFilter';
+import { SizeFilter } from '@/components/cells/SizeFilter/SizeFilter';
+import { ProductListingActiveFilters } from '@/components/organisms/ProductListingActiveFilters/ProductListingActiveFilters';
import useFilters from '@/hooks/useFilters';
import { CloseIcon } from '@/icons';
import { cn } from '@/lib/utils';
diff --git a/apps/storefront/src/components/organisms/ProductsPagination/ProductsPagination.tsx b/apps/storefront/src/components/organisms/ProductsPagination/ProductsPagination.tsx
index 2c5c4a403..58c6908f1 100644
--- a/apps/storefront/src/components/organisms/ProductsPagination/ProductsPagination.tsx
+++ b/apps/storefront/src/components/organisms/ProductsPagination/ProductsPagination.tsx
@@ -1,5 +1,5 @@
'use client';
-import { Pagination } from '@/components/cells';
+import { Pagination } from '@/components/cells/Pagination/Pagination';
import { usePagination } from '@/hooks/usePagination';
export const ProductsPagination = ({
diff --git a/apps/storefront/src/components/organisms/PromoCode/PromoCode.tsx b/apps/storefront/src/components/organisms/PromoCode/PromoCode.tsx
index 2dd60f7fb..b6e6b1af2 100644
--- a/apps/storefront/src/components/organisms/PromoCode/PromoCode.tsx
+++ b/apps/storefront/src/components/organisms/PromoCode/PromoCode.tsx
@@ -2,7 +2,9 @@
import { useEffect, useRef, useState, useTransition } from 'react';
-import { Button, Card, Input } from '@/components/atoms';
+import { Button } from '@/components/atoms/Button/Button';
+import { Card } from '@/components/atoms/Card/Card';
+import { Input } from '@/components/atoms/Input/Input';
import { BinIcon, CollapseIcon, DiscountIcon } from '@/icons';
import { applyPromotions, deletePromotionCode } from '@/lib/data/cart';
import { toast } from '@/lib/helpers/toast';
diff --git a/apps/storefront/src/components/organisms/SellerFooter/SellerFooter.tsx b/apps/storefront/src/components/organisms/SellerFooter/SellerFooter.tsx
index a42b75801..fa31a145f 100644
--- a/apps/storefront/src/components/organisms/SellerFooter/SellerFooter.tsx
+++ b/apps/storefront/src/components/organisms/SellerFooter/SellerFooter.tsx
@@ -1,6 +1,8 @@
"use client"
-import { Button, Divider } from "@/components/atoms"
-import { Modal, ReportSellerForm } from "@/components/molecules"
+import { Button } from '@/components/atoms/Button/Button';
+import { Divider } from '@/components/atoms/Divider/Divider';
+import { Modal } from '@/components/molecules/Modal/Modal';
+import { ReportSellerForm } from '@/components/molecules/ReportSellerForm/ReportSellerForm';
import { DoneIcon } from "@/icons"
import { SingleProductSeller } from "@/types/product"
import { SellerDTO } from "@mercurjs/types"
diff --git a/apps/storefront/src/components/organisms/SellerHeading/SellerHeading.tsx b/apps/storefront/src/components/organisms/SellerHeading/SellerHeading.tsx
index 71e7bd88d..091a7755c 100644
--- a/apps/storefront/src/components/organisms/SellerHeading/SellerHeading.tsx
+++ b/apps/storefront/src/components/organisms/SellerHeading/SellerHeading.tsx
@@ -1,4 +1,4 @@
-import { SellerInfo } from "@/components/molecules"
+import { SellerInfo } from '@/components/molecules/SellerInfo/SellerInfo';
import { SellerDTO } from "@mercurjs/types"
import { Chat } from "../Chat/Chat"
import { HttpTypes } from "@medusajs/types"
diff --git a/apps/storefront/src/components/organisms/SellerTabs/SellerTabs.tsx b/apps/storefront/src/components/organisms/SellerTabs/SellerTabs.tsx
index 33b3dafd9..7635917a9 100644
--- a/apps/storefront/src/components/organisms/SellerTabs/SellerTabs.tsx
+++ b/apps/storefront/src/components/organisms/SellerTabs/SellerTabs.tsx
@@ -1,7 +1,8 @@
import { Suspense } from "react"
import { ProductListingSkeleton } from "../ProductListingSkeleton/ProductListingSkeleton"
-import { SellerOffersListing } from "@/components/sections"
-import { TabsContent, TabsList } from "@/components/molecules"
+import { SellerOffersListing } from '@/components/sections/SellerOffersListing/SellerOffersListing';
+import { TabsContent } from '@/components/molecules/TabsContent/TabsContent';
+import { TabsList } from '@/components/molecules/TabsList/TabsList';
export const SellerTabs = ({
tab,
diff --git a/apps/storefront/src/components/organisms/ShippingAddress/ShippingAddress.tsx b/apps/storefront/src/components/organisms/ShippingAddress/ShippingAddress.tsx
index e55c3d322..500966253 100644
--- a/apps/storefront/src/components/organisms/ShippingAddress/ShippingAddress.tsx
+++ b/apps/storefront/src/components/organisms/ShippingAddress/ShippingAddress.tsx
@@ -2,7 +2,7 @@ import { HttpTypes } from "@medusajs/types"
import { Container } from "@medusajs/ui"
import { mapKeys } from "lodash"
import React, { useEffect, useMemo, useState } from "react"
-import { Input } from "@/components/atoms"
+import { Input } from '@/components/atoms/Input/Input';
import AddressSelect from "@/components/cells/AddressSelect/AddressSelect"
import CountrySelect from "@/components/cells/CountrySelect/CountrySelect"
import { usePathname } from "next/navigation"
diff --git a/apps/storefront/src/components/organisms/SingleOrderReturn/SingleOrderReturn.tsx b/apps/storefront/src/components/organisms/SingleOrderReturn/SingleOrderReturn.tsx
index a6ad481b4..7b4a60644 100644
--- a/apps/storefront/src/components/organisms/SingleOrderReturn/SingleOrderReturn.tsx
+++ b/apps/storefront/src/components/organisms/SingleOrderReturn/SingleOrderReturn.tsx
@@ -1,6 +1,9 @@
"use client"
-import { Avatar, Badge, Card, Divider } from "@/components/atoms"
+import { Avatar } from '@/components/atoms/Avatar/Avatar';
+import { Badge } from '@/components/atoms/Badge/Badge';
+import { Card } from '@/components/atoms/Card/Card';
+import { Divider } from '@/components/atoms/Divider/Divider';
import { CollapseIcon } from "@/icons"
import { cn } from "@/lib/utils"
import { Heading } from "@medusajs/ui"
diff --git a/apps/storefront/src/components/providers/Locale/LocaleProvider.tsx b/apps/storefront/src/components/providers/Locale/LocaleProvider.tsx
new file mode 100644
index 000000000..f8dfc3551
--- /dev/null
+++ b/apps/storefront/src/components/providers/Locale/LocaleProvider.tsx
@@ -0,0 +1,21 @@
+"use client"
+
+import { createContext, PropsWithChildren, useContext, useEffect } from "react"
+
+import { toHreflang } from "@/lib/helpers/hreflang"
+
+const LocaleContext = createContext<string | null>(null)
+
+export function LocaleProvider({ children, locale }: PropsWithChildren<{ locale: string }>) {
+ useEffect(() => {
+ document.documentElement.lang = toHreflang(locale)
+ }, [locale])
+
+ return <LocaleContext.Provider value={locale}>{children}</LocaleContext.Provider>
+}
+
+// Reading the locale from the [locale] layout instead of useParams() keeps links
+// out of Suspense, so they render in every route's static shell.
+export function useLocale() {
+ return useContext(LocaleContext) || process.env.NEXT_PUBLIC_DEFAULT_REGION || "us"
+}
diff --git a/apps/storefront/src/components/providers/TalkJs/CustomerTalkJsProvider.tsx b/apps/storefront/src/components/providers/TalkJs/CustomerTalkJsProvider.tsx
new file mode 100644
index 000000000..d755fd69f
--- /dev/null
+++ b/apps/storefront/src/components/providers/TalkJs/CustomerTalkJsProvider.tsx
@@ -0,0 +1,25 @@
+import { ReactNode } from 'react';
+
+import { retrieveCustomer } from '@/lib/data/customer';
+
+import { TalkJsProvider } from './TalkJsProvider';
+
+export async function CustomerTalkJsProvider({ children }: { children: ReactNode }) {
+ const appId = process.env.NEXT_PUBLIC_TALKJS_APP_ID;
+ const user = await retrieveCustomer();
+
+ if (!appId || !user?.id || !user.email) {
+ return <>{children}</>;
+ }
+
+ return (
+ <TalkJsProvider
+ appId={appId}
+ userId={user.id}
+ userName={[user.first_name, user.last_name].filter(Boolean).join(' ') || 'User'}
+ userEmail={user.email}
+ >
+ {children}
+ </TalkJsProvider>
+ );
+}
diff --git a/apps/storefront/src/components/sections/BannerSection/BannerSection.tsx b/apps/storefront/src/components/sections/BannerSection/BannerSection.tsx
index 98bbbefb9..648b00f07 100644
--- a/apps/storefront/src/components/sections/BannerSection/BannerSection.tsx
+++ b/apps/storefront/src/components/sections/BannerSection/BannerSection.tsx
@@ -1,4 +1,4 @@
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import Image from "next/image"
diff --git a/apps/storefront/src/components/sections/BlogSection/BlogSection.tsx b/apps/storefront/src/components/sections/BlogSection/BlogSection.tsx
index bd0f4eaa1..ae55042c3 100644
--- a/apps/storefront/src/components/sections/BlogSection/BlogSection.tsx
+++ b/apps/storefront/src/components/sections/BlogSection/BlogSection.tsx
@@ -1,5 +1,5 @@
import { BlogPost } from '@/types/blog';
-import { BlogCard } from '@/components/organisms';
+import { BlogCard } from '@/components/organisms/BlogCard/BlogCard';
export const blogPosts: BlogPost[] = [
{
diff --git a/apps/storefront/src/components/sections/Cart/Cart.tsx b/apps/storefront/src/components/sections/Cart/Cart.tsx
index 2fdca5f15..7c7dea6cf 100644
--- a/apps/storefront/src/components/sections/Cart/Cart.tsx
+++ b/apps/storefront/src/components/sections/Cart/Cart.tsx
@@ -1,8 +1,10 @@
'use client';
-import { Button } from '@/components/atoms';
+import { Button } from '@/components/atoms/Button/Button';
import LocalizedClientLink from '@/components/molecules/LocalizedLink/LocalizedLink';
-import { CartEmpty, CartItems, CartSummary } from '@/components/organisms';
+import { CartEmpty } from '@/components/organisms/CartEmpty/CartEmpty';
+import { CartItems } from '@/components/organisms/CartItems/CartItems';
+import { CartSummary } from '@/components/organisms/CartSummary/CartSummary';
import { useCartContext } from '@/components/providers';
export const Cart = () => {
diff --git a/apps/storefront/src/components/sections/CartAddressSection/CartAddressSection.tsx b/apps/storefront/src/components/sections/CartAddressSection/CartAddressSection.tsx
index d07a3fb80..de6d5b4fc 100644
--- a/apps/storefront/src/components/sections/CartAddressSection/CartAddressSection.tsx
+++ b/apps/storefront/src/components/sections/CartAddressSection/CartAddressSection.tsx
@@ -6,7 +6,7 @@ import compareAddresses from "@/lib/helpers/compare-addresses"
import { HttpTypes } from "@medusajs/types"
import { usePathname, useRouter, useSearchParams } from "next/navigation"
import { useActionState, useEffect } from "react"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import ErrorMessage from "@/components/molecules/ErrorMessage/ErrorMessage"
import Spinner from "@/icons/spinner"
import ShippingAddress from "@/components/organisms/ShippingAddress/ShippingAddress"
diff --git a/apps/storefront/src/components/sections/CartPaymentSection/CartPaymentSection.tsx b/apps/storefront/src/components/sections/CartPaymentSection/CartPaymentSection.tsx
index f2b76f8f3..613d98169 100644
--- a/apps/storefront/src/components/sections/CartPaymentSection/CartPaymentSection.tsx
+++ b/apps/storefront/src/components/sections/CartPaymentSection/CartPaymentSection.tsx
@@ -7,7 +7,7 @@ import { CheckCircleSolid, CreditCard } from '@medusajs/icons';
import { Container, Heading, Text } from '@medusajs/ui';
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
-import { Button } from '@/components/atoms';
+import { Button } from '@/components/atoms/Button/Button';
import ErrorMessage from '@/components/molecules/ErrorMessage/ErrorMessage';
import { initiatePaymentSession } from '@/lib/data/cart';
diff --git a/apps/storefront/src/components/sections/CartReview/CartItems.tsx b/apps/storefront/src/components/sections/CartReview/CartItems.tsx
index a520c024b..45a54c503 100644
--- a/apps/storefront/src/components/sections/CartReview/CartItems.tsx
+++ b/apps/storefront/src/components/sections/CartReview/CartItems.tsx
@@ -1,6 +1,7 @@
import { HttpTypes } from '@medusajs/types';
-import { CartItemsHeader, CartItemsProducts } from '@/components/cells';
+import { CartItemsHeader } from '@/components/cells/CartItemsHeader/CartItemsHeader';
+import { CartItemsProducts } from '@/components/cells/CartItemsProducts/CartItemsProducts';
export const CartItems = ({ cart }: { cart: HttpTypes.StoreCart | null }) => {
if (!cart) return null;
diff --git a/apps/storefront/src/components/sections/CartReview/CartReview.tsx b/apps/storefront/src/components/sections/CartReview/CartReview.tsx
index 753927c99..24bd5abd5 100644
--- a/apps/storefront/src/components/sections/CartReview/CartReview.tsx
+++ b/apps/storefront/src/components/sections/CartReview/CartReview.tsx
@@ -1,6 +1,6 @@
'use client';
-import { CartSummary } from '@/components/organisms';
+import { CartSummary } from '@/components/organisms/CartSummary/CartSummary';
import { PromoCode } from '@/components/organisms/PromoCode/PromoCode';
import { CartItems } from './CartItems';
diff --git a/apps/storefront/src/components/sections/CartReview/PaymentButton.tsx b/apps/storefront/src/components/sections/CartReview/PaymentButton.tsx
index 1830d2e17..1b28a0886 100644
--- a/apps/storefront/src/components/sections/CartReview/PaymentButton.tsx
+++ b/apps/storefront/src/components/sections/CartReview/PaymentButton.tsx
@@ -6,7 +6,7 @@ import { placeOrder } from "@/lib/data/cart"
import { HttpTypes } from "@medusajs/types"
import { useElements, useStripe } from "@stripe/react-stripe-js"
import React, { useEffect, useState } from "react"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import { orderErrorFormatter } from "@/lib/helpers/order-error-formatter"
import { toast } from "@/lib/helpers/toast"
diff --git a/apps/storefront/src/components/sections/CartShippingMethodsSection/CartShippingMethodRow.tsx b/apps/storefront/src/components/sections/CartShippingMethodsSection/CartShippingMethodRow.tsx
index 2e263861e..490b4f528 100644
--- a/apps/storefront/src/components/sections/CartShippingMethodsSection/CartShippingMethodRow.tsx
+++ b/apps/storefront/src/components/sections/CartShippingMethodsSection/CartShippingMethodRow.tsx
@@ -1,6 +1,6 @@
"use client"
-import { Button } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
import { BinIcon } from "@/icons"
import { convertToLocale } from "@/lib/helpers/money"
diff --git a/apps/storefront/src/components/sections/CartShippingMethodsSection/CartShippingMethodsSection.tsx b/apps/storefront/src/components/sections/CartShippingMethodsSection/CartShippingMethodsSection.tsx
index 57e27a443..2d68b2d0a 100644
--- a/apps/storefront/src/components/sections/CartShippingMethodsSection/CartShippingMethodsSection.tsx
+++ b/apps/storefront/src/components/sections/CartShippingMethodsSection/CartShippingMethodsSection.tsx
@@ -9,7 +9,7 @@ import { clx, Heading, Text } from '@medusajs/ui';
import clsx from 'clsx';
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
-import { Button } from '@/components/atoms';
+import { Button } from '@/components/atoms/Button/Button';
import ErrorMessage from '@/components/molecules/ErrorMessage/ErrorMessage';
import { removeShippingMethod, setShippingMethod } from '@/lib/data/cart';
import { calculatePriceForShippingOption } from '@/lib/data/fulfillment';
diff --git a/apps/storefront/src/components/sections/HomeCategories/HomeCategories.tsx b/apps/storefront/src/components/sections/HomeCategories/HomeCategories.tsx
index 7ee829477..50bdd2de5 100644
--- a/apps/storefront/src/components/sections/HomeCategories/HomeCategories.tsx
+++ b/apps/storefront/src/components/sections/HomeCategories/HomeCategories.tsx
@@ -1,5 +1,5 @@
-import { Carousel } from "@/components/cells"
-import { CategoryCard } from "@/components/organisms"
+import { CustomCarousel as Carousel } from '@/components/cells/Carousel/Carousel';
+import { CategoryCard } from '@/components/organisms/CategoryCard/CategoryCard';
export const categories: { id: number; name: string; handle: string }[] = [
{
diff --git a/apps/storefront/src/components/sections/HomePopularBrandsSection/HomePopularBrandsSection.tsx b/apps/storefront/src/components/sections/HomePopularBrandsSection/HomePopularBrandsSection.tsx
index 47c754e60..eeb5d1cb7 100644
--- a/apps/storefront/src/components/sections/HomePopularBrandsSection/HomePopularBrandsSection.tsx
+++ b/apps/storefront/src/components/sections/HomePopularBrandsSection/HomePopularBrandsSection.tsx
@@ -1,6 +1,6 @@
import { Brand } from '@/types/brands';
-import { BrandCard } from '@/components/organisms';
-import { Carousel } from '@/components/cells';
+import { BrandCard } from '@/components/organisms/BrandCard/BrandCard';
+import { CustomCarousel as Carousel } from '@/components/cells/Carousel/Carousel';
const brands: Brand[] = [
{
diff --git a/apps/storefront/src/components/sections/HomeProductSection/HomeProductSection.tsx b/apps/storefront/src/components/sections/HomeProductSection/HomeProductSection.tsx
index 91fef2211..450ac6396 100644
--- a/apps/storefront/src/components/sections/HomeProductSection/HomeProductSection.tsx
+++ b/apps/storefront/src/components/sections/HomeProductSection/HomeProductSection.tsx
@@ -1,4 +1,4 @@
-import { HomeProductsCarousel } from "@/components/organisms"
+import { HomeProductsCarousel } from '@/components/organisms/HomeProductsCarousel/HomeProductsCarousel';
import { Product } from "@/types/product"
export const HomeProductSection = async ({
diff --git a/apps/storefront/src/components/sections/OrderReturnSection/OrderReturnSection.tsx b/apps/storefront/src/components/sections/OrderReturnSection/OrderReturnSection.tsx
index eeb2ca8b7..a5cbc8caa 100644
--- a/apps/storefront/src/components/sections/OrderReturnSection/OrderReturnSection.tsx
+++ b/apps/storefront/src/components/sections/OrderReturnSection/OrderReturnSection.tsx
@@ -1,7 +1,7 @@
"use client"
-import { Button } from "@/components/atoms"
-import { UserNavigation } from "@/components/molecules"
+import { Button } from '@/components/atoms/Button/Button';
+import { UserNavigation } from '@/components/molecules/UserNavigation/UserNavigation';
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"
import { ArrowLeftIcon } from "@/icons"
import { ReturnItemsTab } from "./ReturnItemsTab"
diff --git a/apps/storefront/src/components/sections/OrderReturnSection/ReturnItemsTab.tsx b/apps/storefront/src/components/sections/OrderReturnSection/ReturnItemsTab.tsx
index 134a55c83..15443f183 100644
--- a/apps/storefront/src/components/sections/OrderReturnSection/ReturnItemsTab.tsx
+++ b/apps/storefront/src/components/sections/OrderReturnSection/ReturnItemsTab.tsx
@@ -1,4 +1,5 @@
-import { Card, Checkbox } from "@/components/atoms"
+import { Card } from '@/components/atoms/Card/Card';
+import { Checkbox } from '@/components/atoms/Checkbox/Checkbox';
import { convertToLocale } from "@/lib/helpers/money"
import {
Listbox,
diff --git a/apps/storefront/src/components/sections/OrderReturnSection/ReturnMethodsTab.tsx b/apps/storefront/src/components/sections/OrderReturnSection/ReturnMethodsTab.tsx
index d8680005d..02cf0cd97 100644
--- a/apps/storefront/src/components/sections/OrderReturnSection/ReturnMethodsTab.tsx
+++ b/apps/storefront/src/components/sections/OrderReturnSection/ReturnMethodsTab.tsx
@@ -1,4 +1,5 @@
-import { Card, Checkbox } from "@/components/atoms"
+import { Card } from '@/components/atoms/Card/Card';
+import { Checkbox } from '@/components/atoms/Checkbox/Checkbox';
export const ReturnMethodsTab = ({
shippingMethods,
diff --git a/apps/storefront/src/components/sections/OrderReturnSection/ReturnSummaryTab.tsx b/apps/storefront/src/components/sections/OrderReturnSection/ReturnSummaryTab.tsx
index b252c50c5..21e8a8035 100644
--- a/apps/storefront/src/components/sections/OrderReturnSection/ReturnSummaryTab.tsx
+++ b/apps/storefront/src/components/sections/OrderReturnSection/ReturnSummaryTab.tsx
@@ -1,4 +1,5 @@
-import { Button, Card } from "@/components/atoms"
+import { Button } from '@/components/atoms/Button/Button';
+import { Card } from '@/components/atoms/Card/Card';
import { convertToLocale } from "@/lib/helpers/money"
import Image from "next/image"
diff --git a/apps/storefront/src/components/sections/ProductDetailsPage/ProductDetailsPage.tsx b/apps/storefront/src/components/sections/ProductDetailsPage/ProductDetailsPage.tsx
index 54d6adc56..8db93e83e 100644
--- a/apps/storefront/src/components/sections/ProductDetailsPage/ProductDetailsPage.tsx
+++ b/apps/storefront/src/components/sections/ProductDetailsPage/ProductDetailsPage.tsx
@@ -1,4 +1,5 @@
-import { ProductDetails, ProductGallery } from "@/components/organisms"
+import { ProductDetails } from '@/components/organisms/ProductDetails/ProductDetails';
+import { ProductGallery } from '@/components/organisms/ProductGallery/ProductGallery';
import { listProducts } from "@/lib/data/products"
import { listOffers } from "@/lib/data/offers"
import { retrieveCustomer } from "@/lib/data/customer"
diff --git a/apps/storefront/src/components/sections/ProductListing/ListingResultsBoundary.tsx b/apps/storefront/src/components/sections/ProductListing/ListingResultsBoundary.tsx
new file mode 100644
index 000000000..6ad64702b
--- /dev/null
+++ b/apps/storefront/src/components/sections/ProductListing/ListingResultsBoundary.tsx
@@ -0,0 +1,22 @@
+"use client"
+
+import { useSearchParams } from "next/navigation"
+import { ReactNode, Suspense } from "react"
+
+// Keyed by the search string so a filter, sort or page change shows the results
+// fallback while the toolbar and sidebar stay mounted.
+export function ListingResultsBoundary({
+ children,
+ fallback,
+}: {
+ children: ReactNode
+ fallback: ReactNode
+}) {
+ const searchParams = useSearchParams()
+
+ return (
+ <Suspense key={searchParams.toString()} fallback={fallback}>
+ {children}
+ </Suspense>
+ )
+}
diff --git a/apps/storefront/src/components/sections/ProductListing/ProductListing.tsx b/apps/storefront/src/components/sections/ProductListing/ProductListing.tsx
deleted file mode 100644
index 65daf9434..000000000
--- a/apps/storefront/src/components/sections/ProductListing/ProductListing.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-import {
- ProductListingActiveFilters,
- ProductListingHeader,
- ProductSidebar,
- ProductsList,
- ProductsPagination,
-} from "@/components/organisms"
-import { PRODUCT_LIMIT } from "@/const"
-import { listProductsWithSort } from "@/lib/data/products"
-
-export const ProductListing = async ({
- category_id,
- collection_id,
- showSidebar = false,
- locale = process.env.NEXT_PUBLIC_DEFAULT_REGION || "pl",
-}: {
- category_id?: string | string[]
- collection_id?: string
- showSidebar?: boolean
- locale?: string
-}) => {
- const { response } = await listProductsWithSort({
- category_id,
- collection_id,
- countryCode: locale,
- sortBy: "created_at",
- queryParams: {
- limit: PRODUCT_LIMIT,
- },
- })
-
- const { products } = await response
-
- const count = products.length
-
- const pages = Math.ceil(count / PRODUCT_LIMIT) || 1
-
- return (
- <div className="py-4" data-testid="product-listing-container">
- <ProductListingHeader total={count} />
- <div className="hidden md:block">
- <ProductListingActiveFilters />
- </div>
- <div className="grid grid-cols-1 md:grid-cols-4 mt-6 gap-4">
- {showSidebar && <ProductSidebar />}
- <section className={showSidebar ? "col-span-3" : "col-span-4"} data-testid="product-listing-section">
- <div className="flex flex-wrap gap-4" data-testid="product-list">
- <ProductsList products={products} />
- </div>
- <ProductsPagination pages={pages} />
- </section>
- </div>
- </div>
- )
-}
diff --git a/apps/storefront/src/components/sections/ProductListing/SearchProductsListing.tsx b/apps/storefront/src/components/sections/ProductListing/SearchProductsListing.tsx
index 31007e9ac..36fed6b48 100644
--- a/apps/storefront/src/components/sections/ProductListing/SearchProductsListing.tsx
+++ b/apps/storefront/src/components/sections/ProductListing/SearchProductsListing.tsx
@@ -1,148 +1,132 @@
-"use client"
+import { Suspense } from "react"
-import { HttpTypes } from "@medusajs/types"
-import {
- ProductsPagination,
- ProductSearchSidebar,
- ProductListingActiveFilters,
-} from "@/components/organisms"
-import {
- ProductListingLoadingView,
- ProductListingNoResultsView,
- ProductListingProductsView,
-} from "@/components/molecules"
-import { useSearchParams } from "next/navigation"
+import ProductListingNoResultsView from "@/components/molecules/ProductListingNoResultsView/ProductListingNoResultsView"
+import ProductListingProductsView from "@/components/molecules/ProductListingProductsView/ProductListingProductsView"
+import { ProductListingActiveFilters } from "@/components/organisms/ProductListingActiveFilters/ProductListingActiveFilters"
+import { ProductSearchSidebar } from "@/components/organisms/ProductSearchSidebar/ProductSearchSidebar"
+import { ProductsPagination } from "@/components/organisms/ProductsPagination/ProductsPagination"
import { PRODUCT_LIMIT } from "@/const"
-import { ProductListingSkeleton } from "@/components/organisms/ProductListingSkeleton/ProductListingSkeleton"
-import { useEffect, useMemo, useState } from "react"
-import {
- getSearchFacets,
- searchProducts,
- type SearchFacets,
-} from "@/lib/data/products"
+import { getSearchFacets, searchProducts } from "@/lib/data/products"
import type { SortOptions } from "@/types/product"
-const EMPTY_FACETS: SearchFacets = { attributes: {} }
+import { ListingResultsBoundary } from "./ListingResultsBoundary"
+
+export type ListingSearchParams = Promise<Record<string, string | string[] | undefined>>
// URL params that drive the listing itself rather than attribute filters.
-const RESERVED_PARAMS = new Set([
- "query",
- "page",
- "sortBy",
- "min_price",
- "max_price",
-])
+const RESERVED_PARAMS = new Set(["query", "page", "sortBy", "min_price", "max_price"])
+
+const firstValue = (value: string | string[] | undefined) =>
+ Array.isArray(value) ? value[0] : value
export const SearchProductsListing = ({
category_id,
collection_id,
seller_id,
- locale = process.env.NEXT_PUBLIC_DEFAULT_REGION,
+ locale,
+ searchParams,
}: {
category_id?: string | string[]
collection_id?: string
seller_id?: string
- locale?: string
-}) => {
- const searchParams = useSearchParams()
- const categoryKey = Array.isArray(category_id)
- ? category_id.join(",")
- : category_id
-
- const query = searchParams.get("query") || ""
- const page = +(searchParams.get("page") || 1)
- const sortBy = (searchParams.get("sortBy") as SortOptions | null) || undefined
-
- const [facets, setFacets] = useState<SearchFacets>(EMPTY_FACETS)
- const [products, setProducts] = useState<HttpTypes.StoreProduct[]>([])
- const [count, setCount] = useState(0)
- const [isLoading, setIsLoading] = useState(true)
-
- useEffect(() => {
- getSearchFacets()
- .then(setFacets)
- .catch(() => setFacets(EMPTY_FACETS))
- }, [])
-
- const searchParamsKey = searchParams.toString()
- const attributesKey = useMemo(() => {
- const selected: Record<string, string[]> = {}
- searchParams.forEach((raw, key) => {
- if (RESERVED_PARAMS.has(key) || !raw) {
- return
- }
- selected[key] = raw.split(",").filter(Boolean)
- })
- return JSON.stringify(selected)
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [searchParamsKey])
- const attributes = useMemo(
- () => JSON.parse(attributesKey) as Record<string, string[]>,
- [attributesKey]
- )
-
- useEffect(() => {
- async function fetchProducts() {
- if (!locale) return
-
- try {
- setIsLoading(true)
- const result = await searchProducts({
- query: query || undefined,
- countryCode: locale,
- category_id,
- collection_id,
- seller_id,
- attributes,
- page,
- limit: PRODUCT_LIMIT,
- sortBy,
- })
-
- setProducts(result.products)
- setCount(result.count)
- } catch (error) {
- setProducts([])
- setCount(0)
- } finally {
- setIsLoading(false)
- }
- }
+ locale: string
+ searchParams: ListingSearchParams
+}) => (
+ <div className="min-h-[70vh]" data-testid="product-listing-container">
+ <div className="hidden md:block min-h-6">
+ <Suspense fallback={null}>
+ <ProductListingActiveFilters />
+ </Suspense>
+ </div>
+ <div className="grid grid-cols-1 md:grid-cols-4 gap-4">
+ <aside className="md:col-span-1">
+ <Suspense fallback={null}>
+ <ListingFacets />
+ </Suspense>
+ </aside>
+ <div className="md:col-span-3 w-full flex flex-col">
+ <Suspense fallback={<ListingResultsSkeleton />}>
+ <ListingResultsBoundary fallback={<ListingResultsSkeleton />}>
+ <ListingResults
+ category_id={category_id}
+ collection_id={collection_id}
+ seller_id={seller_id}
+ locale={locale}
+ searchParams={searchParams}
+ />
+ </ListingResultsBoundary>
+ </Suspense>
+ </div>
+ </div>
+ </div>
+)
- fetchProducts()
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [locale, categoryKey, collection_id, seller_id, query, page, sortBy, attributesKey])
+const ListingFacets = async () => {
+ const facets = await getSearchFacets()
+ return <ProductSearchSidebar facets={facets} />
+}
- if (isLoading && products.length === 0) return <ProductListingSkeleton />
+const ListingResults = async ({
+ category_id,
+ collection_id,
+ seller_id,
+ locale,
+ searchParams,
+}: {
+ category_id?: string | string[]
+ collection_id?: string
+ seller_id?: string
+ locale: string
+ searchParams: ListingSearchParams
+}) => {
+ const params = await searchParams
+
+ const attributes: Record<string, string[]> = {}
+ for (const [key, raw] of Object.entries(params)) {
+ const value = firstValue(raw)
+ if (RESERVED_PARAMS.has(key) || !value) continue
+ attributes[key] = value.split(",").filter(Boolean)
+ }
+
+ const { products, count } = await searchProducts({
+ query: firstValue(params.query) || undefined,
+ countryCode: locale,
+ category_id,
+ collection_id,
+ seller_id,
+ attributes,
+ page: Math.max(Number(firstValue(params.page)) || 1, 1),
+ limit: PRODUCT_LIMIT,
+ sortBy: (firstValue(params.sortBy) as SortOptions | undefined) || undefined,
+ })
const pages = Math.ceil(count / PRODUCT_LIMIT) || 1
return (
- <div className="min-h-[70vh]">
- <div className="flex justify-between w-full items-center">
- <div className="my-4 label-md">{`${count} listings`}</div>
+ <>
+ <div className="my-4 label-md" data-testid="product-listing-count">{`${count} listings`}</div>
+ {products.length ? (
+ <ProductListingProductsView products={products} />
+ ) : (
+ <ProductListingNoResultsView />
+ )}
+ <div className="mt-auto">
+ <ProductsPagination pages={pages} />
</div>
- <div className="hidden md:block">
- <ProductListingActiveFilters />
- </div>
- <div className="grid grid-cols-1 md:grid-cols-4 gap-4">
- <aside className="md:col-span-1">
- <ProductSearchSidebar facets={facets} />
- </aside>
- <div className="md:col-span-3 w-full flex flex-col">
- {isLoading && <ProductListingLoadingView />}
-
- {!isLoading && !products.length && <ProductListingNoResultsView />}
-
- {!isLoading && products.length > 0 && (
- <ProductListingProductsView products={products} />
- )}
-
- <div className="mt-auto">
- <ProductsPagination pages={pages} />
- </div>
- </div>
- </div>
- </div>
+ </>
)
}
+
+const ListingResultsSkeleton = () => (
+ <div aria-busy="true" data-testid="product-listing-results-skeleton">
+ <div className="my-4 h-5 w-24 animate-pulse rounded-sm bg-secondary" />
+ <ul className="flex flex-wrap gap-4">
+ {Array.from({ length: 8 }, (_, index) => (
+ <li
+ key={index}
+ className="h-[420px] w-full min-w-[250px] animate-pulse rounded-sm bg-secondary lg:w-[calc(25%-1rem)]"
+ />
+ ))}
+ </ul>
+ </div>
+)
diff --git a/apps/storefront/src/components/sections/SellerOffersListing/SellerOffersListing.tsx b/apps/storefront/src/components/sections/SellerOffersListing/SellerOffersListing.tsx
index 38b35ffa7..98ae057be 100644
--- a/apps/storefront/src/components/sections/SellerOffersListing/SellerOffersListing.tsx
+++ b/apps/storefront/src/components/sections/SellerOffersListing/SellerOffersListing.tsx
@@ -1,5 +1,6 @@
-import { OfferCard, ProductsPagination } from "@/components/organisms"
-import { ProductListingNoResultsView } from "@/components/molecules"
+import { OfferCard } from '@/components/organisms/OfferCard/OfferCard';
+import { ProductsPagination } from '@/components/organisms/ProductsPagination/ProductsPagination';
+import ProductListingNoResultsView from '@/components/molecules/ProductListingNoResultsView/ProductListingNoResultsView';
import { PRODUCT_LIMIT } from "@/const"
import { listOffers } from "@/lib/data/offers"
import type { StoreOffer } from "@/lib/helpers/buybox"
diff --git a/apps/storefront/src/components/sections/SellerPageHeader/SellerPageHeader.tsx b/apps/storefront/src/components/sections/SellerPageHeader/SellerPageHeader.tsx
index 69b49c31b..001986937 100644
--- a/apps/storefront/src/components/sections/SellerPageHeader/SellerPageHeader.tsx
+++ b/apps/storefront/src/components/sections/SellerPageHeader/SellerPageHeader.tsx
@@ -1,4 +1,5 @@
-import { SellerFooter, SellerHeading } from "@/components/organisms"
+import { SellerFooter } from '@/components/organisms/SellerFooter/SellerFooter';
+import { SellerHeading } from '@/components/organisms/SellerHeading/SellerHeading';
import { HttpTypes } from "@medusajs/types"
export const SellerPageHeader = ({
diff --git a/apps/storefront/src/components/sections/index.ts b/apps/storefront/src/components/sections/index.ts
index 720caad87..9549a71a2 100644
--- a/apps/storefront/src/components/sections/index.ts
+++ b/apps/storefront/src/components/sections/index.ts
@@ -4,7 +4,6 @@ import { HomeCategories } from "./HomeCategories/HomeCategories"
import { BannerSection } from "./BannerSection/BannerSection"
import { ShopByStyleSection } from "./ShopByStyle/ShopByStyleSection"
import { BlogSection } from "./BlogSection/BlogSection"
-import { ProductListing } from "./ProductListing/ProductListing"
import { SellerPageHeader } from "./SellerPageHeader/SellerPageHeader"
import { Cart } from "./Cart/Cart"
import { ProductDetailsPage } from "./ProductDetailsPage/ProductDetailsPage"
@@ -19,7 +18,6 @@ export {
BannerSection,
ShopByStyleSection,
BlogSection,
- ProductListing,
SellerPageHeader,
Cart,
ProductDetailsPage,
diff --git a/apps/storefront/src/lib/data/cache-tags.ts b/apps/storefront/src/lib/data/cache-tags.ts
index 1e152b198..15f91971b 100644
--- a/apps/storefront/src/lib/data/cache-tags.ts
+++ b/apps/storefront/src/lib/data/cache-tags.ts
@@ -1,12 +1,11 @@
+import { cacheLife } from 'next/cache';
+
/**
* Stable, catalog-wide cache tags. Unlike the per-visitor `getCacheOptions` in
* `cookies.ts`, these are NOT suffixed with `_medusa_cache_id`, so the backend
* can name and invalidate them from a webhook (see
* `src/app/api/revalidate/route.ts`). Only use these for non-personalized
* catalog data — never for cart/order/customer.
- *
- * This module is intentionally free of `server-only` / `next/headers` so it can
- * be imported by catalog data files that also end up in client bundles.
*/
export const CACHE_TAGS = {
products: 'products',
@@ -18,19 +17,17 @@ export const CACHE_TAGS = {
collection: (handle: string) => `collection-${handle}`,
categories: 'categories',
category: (handle: string) => `category-${handle}`,
+ regions: 'regions',
sellers: 'sellers',
seller: (handle: string) => `seller-${handle}`,
} as const;
/**
- * Heavy, indefinite caching: `revalidate: false` caches the fetch forever, with
- * the ONLY invalidation path being a `revalidateTag` on one of these tags
- * (pushed from the backend webhook). No time-based revalidation.
+ * Call inside a `"use cache"` read when the backend request failed. The
+ * fallback still fits in the prerendered shell, so builds without a reachable
+ * backend succeed, and it revalidates a minute later instead of living for the
+ * read's normal lifetime.
*/
-export const getGlobalCacheOptions = (
- base: string,
- scoped?: string
-): { revalidate: false; tags: string[] } => {
- const tags = scoped ? [base, scoped] : [base];
- return { revalidate: false, tags };
+export const cacheFailedRead = () => {
+ cacheLife('minutes');
};
diff --git a/apps/storefront/src/lib/data/cart.ts b/apps/storefront/src/lib/data/cart.ts
index 320e72c24..aa90d6b88 100644
--- a/apps/storefront/src/lib/data/cart.ts
+++ b/apps/storefront/src/lib/data/cart.ts
@@ -94,7 +94,7 @@ export async function updateCart(data: HttpTypes.StoreUpdateCart) {
.mutate({ $id: cartId, ...data, fetchOptions: { headers } })
.then(async ({ cart }) => {
const cartCacheTag = await getCacheTag('carts');
- await revalidateTag(cartCacheTag);
+ await revalidateTag(cartCacheTag, { expire: 0 });
return cart;
})
.catch(medusaError);
@@ -222,7 +222,7 @@ export async function setShippingMethod({
.catch(error => ({ ok: false, error, data: null }));
const cartCacheTag = await getCacheTag('carts');
- revalidateTag(cartCacheTag);
+ revalidateTag(cartCacheTag, { expire: 0 });
return res;
}
@@ -257,7 +257,7 @@ export async function initiatePaymentSession(
});
const cartCacheTag = await getCacheTag('carts');
- revalidateTag(cartCacheTag);
+ revalidateTag(cartCacheTag, { expire: 0 });
return resp;
} catch (error) {
@@ -283,7 +283,7 @@ export async function applyPromotions(codes: string[]) {
fetchOptions: { headers }
})
const cartCacheTag = await getCacheTag("carts")
- revalidateTag(cartCacheTag)
+ revalidateTag(cartCacheTag, { expire: 0 })
// @ts-ignore
const applied = cart.promotions?.some((promotion: any) =>
codes.includes(promotion.code)
@@ -317,7 +317,7 @@ export async function removeShippingMethod(shippingMethodId: string) {
} as never) as unknown as Promise<{ cart: HttpTypes.StoreCart }>)
.then(async () => {
const cartCacheTag = await getCacheTag('carts');
- revalidateTag(cartCacheTag);
+ revalidateTag(cartCacheTag, { expire: 0 });
})
.catch(medusaError);
}
@@ -341,7 +341,7 @@ export async function deletePromotionCode(promoId: string) {
} as never) as unknown as Promise<{ cart: HttpTypes.StoreCart }>)
.then(async () => {
const cartCacheTag = await getCacheTag('carts');
- revalidateTag(cartCacheTag);
+ revalidateTag(cartCacheTag, { expire: 0 });
})
.catch(medusaError);
}
@@ -398,7 +398,7 @@ export async function placeOrder(cartId?: string) {
.catch(error => ({ ok: false, error, data: null as any }));
const cartCacheTag = await getCacheTag('carts');
- revalidateTag(cartCacheTag);
+ revalidateTag(cartCacheTag, { expire: 0 });
if (res.data?.order_group) {
revalidatePath('/user/reviews');
@@ -425,14 +425,14 @@ export async function updateRegion(countryCode: string, currentPath: string) {
if (cartId) {
await updateCart({ region_id: region.id });
const cartCacheTag = await getCacheTag('carts');
- revalidateTag(cartCacheTag);
+ revalidateTag(cartCacheTag, { expire: 0 });
}
const regionCacheTag = await getCacheTag('regions');
- revalidateTag(regionCacheTag);
+ revalidateTag(regionCacheTag, { expire: 0 });
const productsCacheTag = await getCacheTag('products');
- revalidateTag(productsCacheTag);
+ revalidateTag(productsCacheTag, { expire: 0 });
redirect(`/${countryCode}${currentPath}`);
}
@@ -500,14 +500,14 @@ export async function updateRegionWithValidation(
}
const cartCacheTag = await getCacheTag('carts');
- revalidateTag(cartCacheTag);
+ revalidateTag(cartCacheTag, { expire: 0 });
}
const regionCacheTag = await getCacheTag('regions');
- revalidateTag(regionCacheTag);
+ revalidateTag(regionCacheTag, { expire: 0 });
const productsCacheTag = await getCacheTag('products');
- revalidateTag(productsCacheTag);
+ revalidateTag(productsCacheTag, { expire: 0 });
return {
removedItems,
diff --git a/apps/storefront/src/lib/data/categories.ts b/apps/storefront/src/lib/data/categories.ts
index d5e382ed1..0ca411430 100644
--- a/apps/storefront/src/lib/data/categories.ts
+++ b/apps/storefront/src/lib/data/categories.ts
@@ -1,13 +1,19 @@
import { HttpTypes } from '@medusajs/types';
+import { cacheLife, cacheTag } from 'next/cache';
+
import { sdk } from '@/lib/client';
-import { CACHE_TAGS, getGlobalCacheOptions } from './cache-tags';
+import { CACHE_TAGS, cacheFailedRead } from './cache-tags';
interface CategoriesProps {
query?: Record<string, unknown>;
}
export const listCategories = async ({ query }: Partial<CategoriesProps> = {}) => {
+ 'use cache';
+ cacheLife('hours');
+ cacheTag(CACHE_TAGS.categories);
+
const limit = query?.limit || 100;
const allCategories = await (sdk.store.productCategories
@@ -17,12 +23,13 @@ export const listCategories = async ({ query }: Partial<CategoriesProps> = {}) =
include_ancestors_tree: true,
limit,
...query,
- fetchOptions: {
- cache: 'force-cache',
- next: getGlobalCacheOptions(CACHE_TAGS.categories)
- }
+ fetchOptions: { cache: 'no-store' }
} as never) as unknown as Promise<{ product_categories: HttpTypes.StoreProductCategory[] }>)
- .then(({ product_categories }) => product_categories);
+ .then(({ product_categories }) => product_categories)
+ .catch(() => {
+ cacheFailedRead();
+ return [] as HttpTypes.StoreProductCategory[];
+ });
const parentCategories = allCategories.filter(cat => !cat.parent_category_id);
@@ -48,20 +55,22 @@ export const listCategories = async ({ query }: Partial<CategoriesProps> = {}) =
};
export const getCategoryByHandle = async (categoryHandle: string) => {
+ 'use cache';
+ cacheLife('hours');
+ cacheTag(CACHE_TAGS.categories, CACHE_TAGS.category(categoryHandle));
+
return (sdk.store.productCategories
.query({
fields: 'id,name,handle,parent_category_id,*category_children',
handle: categoryHandle,
include_descendants_tree: true,
- fetchOptions: {
- cache: 'force-cache',
- next: getGlobalCacheOptions(
- CACHE_TAGS.categories,
- CACHE_TAGS.category(categoryHandle)
- )
- }
+ fetchOptions: { cache: 'no-store' }
} as never) as unknown as Promise<HttpTypes.StoreProductCategoryListResponse>)
- .then(({ product_categories }) => product_categories[0]);
+ .then(({ product_categories }) => product_categories[0] ?? null)
+ .catch(() => {
+ cacheFailedRead();
+ return null;
+ });
};
// Medusa's `/store/products?category_id=` filters by the exact category only —
diff --git a/apps/storefront/src/lib/data/collections.ts b/apps/storefront/src/lib/data/collections.ts
index 4e17372ff..1925519f6 100644
--- a/apps/storefront/src/lib/data/collections.ts
+++ b/apps/storefront/src/lib/data/collections.ts
@@ -1,52 +1,63 @@
-"use server"
-
import { HttpTypes } from "@medusajs/types"
-import { CACHE_TAGS, getGlobalCacheOptions } from "./cache-tags"
+import { cacheLife, cacheTag } from "next/cache"
+
import { sdk } from "../client"
+import { CACHE_TAGS, cacheFailedRead } from "./cache-tags"
export const retrieveCollection = async (id: string) => {
- const next = getGlobalCacheOptions(
- CACHE_TAGS.collections,
- CACHE_TAGS.collection(id)
- )
+ "use cache"
+ cacheLife("hours")
+ cacheTag(CACHE_TAGS.collections, CACHE_TAGS.collection(id))
return (sdk.store.collections.$id
.query({
$id: id,
- fetchOptions: { next, cache: "force-cache" },
+ fetchOptions: { cache: "no-store" },
} as never) as unknown as Promise<{ collection: HttpTypes.StoreCollection }>)
.then(({ collection }) => collection)
+ .catch(() => {
+ cacheFailedRead()
+ return null
+ })
}
export const listCollections = async (
queryParams: Record<string, string> = {}
): Promise<{ collections: HttpTypes.StoreCollection[]; count: number }> => {
- const next = getGlobalCacheOptions(CACHE_TAGS.collections)
-
- queryParams.limit = queryParams.limit || "100"
- queryParams.offset = queryParams.offset || "0"
+ "use cache"
+ cacheLife("hours")
+ cacheTag(CACHE_TAGS.collections)
return (sdk.store.collections
.query({
+ limit: "100",
+ offset: "0",
...queryParams,
- fetchOptions: { next, cache: "force-cache" },
+ fetchOptions: { cache: "no-store" },
} as never) as unknown as Promise<{ collections: HttpTypes.StoreCollection[]; count: number }>)
.then(({ collections }) => ({ collections, count: collections.length }))
+ .catch(() => {
+ cacheFailedRead()
+ return { collections: [], count: 0 }
+ })
}
export const getCollectionByHandle = async (
handle: string
-): Promise<HttpTypes.StoreCollection> => {
- const next = getGlobalCacheOptions(
- CACHE_TAGS.collections,
- CACHE_TAGS.collection(handle)
- )
+): Promise<HttpTypes.StoreCollection | null> => {
+ "use cache"
+ cacheLife("hours")
+ cacheTag(CACHE_TAGS.collections, CACHE_TAGS.collection(handle))
return (sdk.store.collections
.query({
handle,
fields: "*products",
- fetchOptions: { next, cache: "force-cache" },
+ fetchOptions: { cache: "no-store" },
} as never) as unknown as Promise<HttpTypes.StoreCollectionListResponse>)
- .then(({ collections }) => collections[0])
+ .then(({ collections }) => collections[0] ?? null)
+ .catch(() => {
+ cacheFailedRead()
+ return null
+ })
}
diff --git a/apps/storefront/src/lib/data/customer.ts b/apps/storefront/src/lib/data/customer.ts
index d184c92ee..94ecb7921 100644
--- a/apps/storefront/src/lib/data/customer.ts
+++ b/apps/storefront/src/lib/data/customer.ts
@@ -49,7 +49,7 @@ export const updateCustomer = async (body: HttpTypes.StoreUpdateCustomer) => {
});
const cacheTag = await getCacheTag('customers');
- revalidateTag(cacheTag);
+ revalidateTag(cacheTag, { expire: 0 });
return updateRes;
};
@@ -96,7 +96,7 @@ export async function signup(formData: FormData) {
await setAuthToken(loginToken as string);
const customerCacheTag = await getCacheTag('customers');
- revalidateTag(customerCacheTag);
+ revalidateTag(customerCacheTag, { expire: 0 });
await transferCart();
@@ -116,7 +116,7 @@ export async function login(formData: FormData) {
.then(({ token }) => token);
await setAuthToken(token as string);
const customerCacheTag = await getCacheTag('customers');
- revalidateTag(customerCacheTag);
+ revalidateTag(customerCacheTag, { expire: 0 });
return { success: true };
} catch (error: unknown) {
@@ -131,12 +131,12 @@ export async function signout() {
await removeAuthToken();
const customerCacheTag = await getCacheTag('customers');
- revalidateTag(customerCacheTag);
+ revalidateTag(customerCacheTag, { expire: 0 });
await removeCartId();
const cartCacheTag = await getCacheTag('carts');
- revalidateTag(cartCacheTag);
+ revalidateTag(cartCacheTag, { expire: 0 });
redirect(`/`);
}
@@ -152,7 +152,7 @@ export async function transferCart() {
await sdk.store.carts.$id.customer.mutate({ $id: cartId, fetchOptions: { headers } });
const cartCacheTag = await getCacheTag('carts');
- revalidateTag(cartCacheTag);
+ revalidateTag(cartCacheTag, { expire: 0 });
}
export const addCustomerAddress = async (formData: FormData): Promise<any> => {
@@ -179,7 +179,7 @@ export const addCustomerAddress = async (formData: FormData): Promise<any> => {
.mutate({ ...address, fetchOptions: { headers } } as never) as unknown as Promise<unknown>)
.then(async () => {
const customerCacheTag = await getCacheTag('customers');
- revalidateTag(customerCacheTag);
+ revalidateTag(customerCacheTag, { expire: 0 });
return { success: true, error: null };
})
.catch(err => {
@@ -196,7 +196,7 @@ export const deleteCustomerAddress = async (addressId: string): Promise<void> =>
.delete({ $addressId: addressId, fetchOptions: { headers } } as never) as unknown as Promise<unknown>)
.then(async () => {
const customerCacheTag = await getCacheTag('customers');
- revalidateTag(customerCacheTag);
+ revalidateTag(customerCacheTag, { expire: 0 });
return { success: true, error: null };
})
.catch(err => {
@@ -238,7 +238,7 @@ export const updateCustomerAddress = async (formData: FormData): Promise<any> =>
.mutate({ $addressId: addressId, ...address, fetchOptions: { headers } } as never) as unknown as Promise<unknown>)
.then(async () => {
const customerCacheTag = await getCacheTag('customers');
- revalidateTag(customerCacheTag);
+ revalidateTag(customerCacheTag, { expire: 0 });
return { success: true, error: null };
})
.catch(err => {
@@ -257,7 +257,7 @@ export const updateCustomerPassword = async (password: string, token: string): P
.then(async () => {
await removeAuthToken();
const customerCacheTag = await getCacheTag('customers');
- revalidateTag(customerCacheTag);
+ revalidateTag(customerCacheTag, { expire: 0 });
return { success: true, error: null };
})
.catch((err: any) => {
diff --git a/apps/storefront/src/lib/data/offers.ts b/apps/storefront/src/lib/data/offers.ts
index 210528816..6dbdcb50d 100644
--- a/apps/storefront/src/lib/data/offers.ts
+++ b/apps/storefront/src/lib/data/offers.ts
@@ -1,10 +1,8 @@
-'use server';
-
import { OfferDTO } from '@mercurjs/types';
+import { cacheLife, cacheTag } from 'next/cache';
import { sdk } from '../client';
-import { getAuthHeaders } from './cookies';
-import { CACHE_TAGS, getGlobalCacheOptions } from './cache-tags';
+import { CACHE_TAGS, cacheFailedRead } from './cache-tags';
import { getRegion } from './regions';
// All fields are `+`-prefixed so they MERGE with the route defaults instead of
@@ -32,17 +30,20 @@ export const listOffers = async ({
limit?: number;
offset?: number;
}): Promise<{ offers: OfferDTO[]; count: number }> => {
+ 'use cache';
+ // Offer price and stock change with every order, which sends no webhook.
+ cacheLife('minutes');
+ cacheTag(CACHE_TAGS.offers);
+ if (productId) {
+ cacheTag(CACHE_TAGS.productOffers(productId));
+ }
+
const region = regionId
? { id: regionId }
: countryCode
? await getRegion(countryCode)
: null;
- const next = getGlobalCacheOptions(
- CACHE_TAGS.offers,
- productId ? CACHE_TAGS.productOffers(productId) : undefined
- );
-
return (
sdk.store.offers.query({
product_id: productId,
@@ -52,21 +53,24 @@ export const listOffers = async ({
limit,
offset,
fields: OFFER_FIELDS,
- fetchOptions: {
- headers: { ...(await getAuthHeaders()) },
- cache: 'force-cache',
- next,
- },
+ fetchOptions: { cache: 'no-store' },
} as never) as unknown as Promise<{ offers: OfferDTO[]; count: number }>
)
.then(({ offers, count }) => ({ offers, count }))
- .catch(() => ({ offers: [], count: 0 }));
+ .catch(() => {
+ cacheFailedRead();
+ return { offers: [], count: 0 };
+ });
};
export const retrieveOffer = async (
id: string,
{ countryCode, regionId }: { countryCode?: string; regionId?: string } = {}
): Promise<OfferDTO | null> => {
+ 'use cache';
+ cacheLife('minutes');
+ cacheTag(CACHE_TAGS.offers, CACHE_TAGS.offer(id));
+
const region = regionId
? { id: regionId }
: countryCode
@@ -79,13 +83,12 @@ export const retrieveOffer = async (
region_id: region?.id,
country_code: countryCode,
fields: OFFER_FIELDS,
- fetchOptions: {
- headers: { ...(await getAuthHeaders()) },
- cache: 'force-cache',
- next: getGlobalCacheOptions(CACHE_TAGS.offers, CACHE_TAGS.offer(id)),
- },
+ fetchOptions: { cache: 'no-store' },
} as never) as unknown as Promise<{ offer: OfferDTO }>
)
.then(({ offer }) => offer)
- .catch(() => null);
+ .catch(() => {
+ cacheFailedRead();
+ return null;
+ });
};
diff --git a/apps/storefront/src/lib/data/products.ts b/apps/storefront/src/lib/data/products.ts
index 05fb861a3..c537366f0 100644
--- a/apps/storefront/src/lib/data/products.ts
+++ b/apps/storefront/src/lib/data/products.ts
@@ -1,13 +1,11 @@
-'use server';
-
import { HttpTypes } from '@medusajs/types';
+import { cacheLife, cacheTag } from 'next/cache';
import { sortProducts } from '@/lib/helpers/sort-products';
import { SortOptions } from '@/types/product';
import { sdk } from '../client';
-import { getAuthHeaders } from './cookies';
-import { CACHE_TAGS, getGlobalCacheOptions } from './cache-tags';
+import { CACHE_TAGS, cacheFailedRead } from './cache-tags';
import { getRegion, retrieveRegion } from './regions';
const PRODUCT_LIST_FIELDS =
@@ -31,17 +29,40 @@ type StoreProductAttribute = {
values?: { name: string; rank?: number }[];
};
+type ProductQueryParams = HttpTypes.FindParams &
+ HttpTypes.StoreProductParams & { handle?: string[] };
+
+type ProductListResult = {
+ response: { products: HttpTypes.StoreProduct[]; count: number };
+ nextPage: number | null;
+ queryParams?: ProductQueryParams;
+};
+
+const queryProducts = (query: Record<string, unknown>) =>
+ sdk.store.products.query({
+ fields: PRODUCT_LIST_FIELDS,
+ ...query,
+ fetchOptions: { cache: 'no-store' },
+ } as never) as unknown as Promise<{ products: HttpTypes.StoreProduct[]; count: number }>;
+
export const getSearchFacets = async (): Promise<SearchFacets> => {
+ 'use cache';
+ cacheLife('hours');
+ cacheTag(CACHE_TAGS.products);
+
const { product_attributes } = await (
sdk.store.productAttributes.query({
is_filterable: true,
limit: 100,
fields: 'handle,name,is_variant_axis,values.name,values.rank',
- fetchOptions: { next: { revalidate: 300 } },
+ fetchOptions: { cache: 'no-store' },
} as never) as unknown as Promise<{
product_attributes: StoreProductAttribute[];
}>
- ).catch(() => ({ product_attributes: [] as StoreProductAttribute[] }));
+ ).catch(() => {
+ cacheFailedRead();
+ return { product_attributes: [] as StoreProductAttribute[] };
+ });
const attributes: Record<string, SearchFacetBucket[]> = {};
for (const attribute of product_attributes) {
@@ -61,6 +82,9 @@ export const getSearchFacets = async (): Promise<SearchFacets> => {
* Products in Mercur are master products from a single shared catalog — they are
* not owned by a seller. Seller-scoped listings and per-seller price/inventory
* come from offers, not from a product→seller relation; use `lib/data/offers.ts`.
+ *
+ * Catalog reads are anonymous so every shopper shares one cache entry; prices
+ * that depend on the customer's groups are applied by the cart, not the catalog.
*/
export const listProducts = async ({
pageParam = 1,
@@ -71,17 +95,16 @@ export const listProducts = async ({
collection_id,
}: {
pageParam?: number;
- queryParams?: HttpTypes.FindParams &
- HttpTypes.StoreProductParams & { handle?: string[] };
+ queryParams?: ProductQueryParams;
category_id?: string | string[];
collection_id?: string;
countryCode?: string;
regionId?: string;
-}): Promise<{
- response: { products: HttpTypes.StoreProduct[]; count: number };
- nextPage: number | null;
- queryParams?: HttpTypes.FindParams & HttpTypes.StoreProductParams;
-}> => {
+}): Promise<ProductListResult> => {
+ 'use cache';
+ cacheLife('max');
+ cacheTag(CACHE_TAGS.products);
+
if (!countryCode && !regionId) {
throw new Error('Country code or region ID is required');
}
@@ -95,25 +118,22 @@ export const listProducts = async ({
: await retrieveRegion(regionId!);
if (!region) {
+ cacheFailedRead();
return { response: { products: [], count: 0 }, nextPage: null };
}
- return (
- sdk.store.products.query({
- category_id,
- collection_id,
- limit,
- offset,
- region_id: region.id,
- fields: PRODUCT_LIST_FIELDS,
- ...queryParams,
- fetchOptions: {
- headers: { ...(await getAuthHeaders()) },
- cache: 'force-cache',
- next: getGlobalCacheOptions(CACHE_TAGS.products),
- },
- } as never) as unknown as Promise<{ products: HttpTypes.StoreProduct[]; count: number }>
- )
+ for (const handle of queryParams?.handle ?? []) {
+ cacheTag(CACHE_TAGS.product(handle));
+ }
+
+ return queryProducts({
+ category_id,
+ collection_id,
+ limit,
+ offset,
+ region_id: region.id,
+ ...queryParams,
+ })
.then(({ products, count }) => {
const nextPage = count > offset + limit ? pageParam + 1 : null;
@@ -123,86 +143,51 @@ export const listProducts = async ({
queryParams,
};
})
- .catch(() => ({
- response: { products: [], count: 0 },
- nextPage: null,
- queryParams,
- }));
+ .catch(() => {
+ cacheFailedRead();
+ return {
+ response: { products: [], count: 0 },
+ nextPage: null,
+ queryParams,
+ };
+ });
};
-export const listProductsWithSort = async ({
- page = 1,
- queryParams,
- sortBy = 'created_at',
- countryCode,
- category_id,
- collection_id,
-}: {
+export type ProductSearchParams = {
+ query?: string;
+ countryCode?: string;
+ regionId?: string;
+ category_id?: string | string[];
+ collection_id?: string | string[];
+ seller_id?: string | string[];
+ attributes?: Record<string, string | string[]>;
page?: number;
- queryParams?: HttpTypes.FindParams & HttpTypes.StoreProductParams;
+ limit?: number;
sortBy?: SortOptions;
- countryCode: string;
- category_id?: string | string[];
- collection_id?: string;
-}): Promise<{
- response: { products: HttpTypes.StoreProduct[]; count: number };
- nextPage: number | null;
- queryParams?: HttpTypes.FindParams & HttpTypes.StoreProductParams;
-}> => {
- const limit = queryParams?.limit || 12;
-
- const {
- response: { products, count },
- } = await listProducts({
- pageParam: 0,
- queryParams: { ...queryParams, limit: 100 },
- category_id,
- collection_id,
- countryCode,
- });
-
- const pricedProducts = products.filter(prod =>
- prod.variants?.some(variant => variant.calculated_price !== null)
- );
-
- const sortedProducts = sortProducts(pricedProducts, sortBy);
-
- const pageParam = (page - 1) * limit;
- const nextPage = count > pageParam + limit ? pageParam + limit : null;
- const paginatedProducts = sortedProducts.slice(pageParam, pageParam + limit);
-
- return {
- response: { products: paginatedProducts, count },
- nextPage,
- queryParams,
- };
};
-export const getProductByHandle = async (handle: string, regionId: string) => {
- const next = getGlobalCacheOptions(
- CACHE_TAGS.products,
- CACHE_TAGS.product(handle)
- );
-
- return (
- sdk.store.products.query({
- handle,
- region_id: regionId,
- fields: PRODUCT_LIST_FIELDS,
- fetchOptions: {
- headers: { ...(await getAuthHeaders()) },
- cache: 'force-cache',
- next,
- },
- } as never) as unknown as Promise<{ products: HttpTypes.StoreProduct[] }>
- ).then(({ products }) => products[0]);
+export type ProductSearchResult = {
+ products: HttpTypes.StoreProduct[];
+ count: number;
+ nextPage: number | null;
};
+export const isDefaultProductSearch = ({
+ query,
+ attributes,
+ page = 1,
+ sortBy,
+}: ProductSearchParams) =>
+ !query &&
+ page <= 1 &&
+ (!sortBy || sortBy === 'created_at') &&
+ !Object.keys(attributes ?? {}).length;
+
/**
- * Price sorts are applied client-side because `/store/products` can only order
+ * Price sorts are applied after fetching because `/store/products` can only order
* by product columns.
*/
-export const searchProducts = async ({
+const fetchProductSearch = async ({
query,
countryCode,
regionId,
@@ -213,60 +198,68 @@ export const searchProducts = async ({
page = 1,
limit = 12,
sortBy,
-}: {
- query?: string;
- countryCode?: string;
- regionId?: string;
- category_id?: string | string[];
- collection_id?: string | string[];
- seller_id?: string | string[];
- attributes?: Record<string, string | string[]>;
- page?: number;
- limit?: number;
- sortBy?: SortOptions;
-}): Promise<{
- products: HttpTypes.StoreProduct[];
- count: number;
- nextPage: number | null;
-}> => {
+}: ProductSearchParams): Promise<ProductSearchResult & { failed?: boolean }> => {
const region = countryCode ? await getRegion(countryCode) : { id: regionId };
if (!region?.id) {
- return { products: [], count: 0, nextPage: null };
+ return { products: [], count: 0, nextPage: null, failed: true };
}
const offset = Math.max(page - 1, 0) * limit;
const order = !sortBy || sortBy === 'created_at' ? '-created_at' : undefined;
- const hasAttributeFilters =
- attributes && Object.keys(attributes).length > 0;
+ const hasAttributeFilters = attributes && Object.keys(attributes).length > 0;
- const { products, count } = await (sdk.store.products.query({
- q: query || undefined,
+ const result = await queryProducts({
+ ...(query ? { q: query } : {}),
region_id: region.id,
category_id,
collection_id,
seller_id,
- attributes: hasAttributeFilters ? attributes : undefined,
+ ...(hasAttributeFilters ? { attributes } : {}),
order,
limit,
offset,
- fields: PRODUCT_LIST_FIELDS,
- fetchOptions: { headers: { ...(await getAuthHeaders()) }, cache: 'no-cache' },
- } as never) as unknown as Promise<{
- products: HttpTypes.StoreProduct[];
- count: number;
- }>).catch(() => ({
- products: [] as HttpTypes.StoreProduct[],
- count: 0,
- }));
+ }).catch(() => null);
+
+ if (!result) {
+ return { products: [], count: 0, nextPage: null, failed: true };
+ }
const ordered =
sortBy === 'price_asc' || sortBy === 'price_desc'
- ? sortProducts(products, sortBy)
- : products;
+ ? sortProducts(result.products, sortBy)
+ : result.products;
+
+ const nextPage = result.count > offset + limit ? page + 1 : null;
+
+ return { products: ordered, count: result.count, nextPage };
+};
- const nextPage = count > offset + limit ? page + 1 : null;
+// Only the default first page of a listing is cached: each filter, sort, query
+// and page combination would be a rarely reused cache entry.
+const getDefaultProductSearch = async (
+ params: ProductSearchParams
+): Promise<ProductSearchResult> => {
+ 'use cache';
+ cacheLife('max');
+ cacheTag(CACHE_TAGS.products);
+
+ const { failed, ...result } = await fetchProductSearch(params);
+ if (failed) {
+ cacheFailedRead();
+ }
+ return result;
+};
+
+export const searchProducts = async (
+ params: ProductSearchParams
+): Promise<ProductSearchResult> => {
+ if (isDefaultProductSearch(params)) {
+ const { countryCode, regionId, category_id, collection_id, seller_id, limit } = params;
+ return getDefaultProductSearch({ countryCode, regionId, category_id, collection_id, seller_id, limit });
+ }
- return { products: ordered, count, nextPage };
+ const { failed: _failed, ...result } = await fetchProductSearch(params);
+ return result;
};
diff --git a/apps/storefront/src/lib/data/regions.ts b/apps/storefront/src/lib/data/regions.ts
index 4a06720a6..86afcd71c 100644
--- a/apps/storefront/src/lib/data/regions.ts
+++ b/apps/storefront/src/lib/data/regions.ts
@@ -1,50 +1,41 @@
-'use server';
-
import { HttpTypes } from '@medusajs/types';
+import { cacheLife, cacheTag } from 'next/cache';
import medusaError from '@/lib/helpers/medusa-error';
import { sdk } from '../client';
-import { getCacheOptions } from './cookies';
+import { CACHE_TAGS, cacheFailedRead } from './cache-tags';
-export const listRegions = async () => {
- const next = {
- ...(await getCacheOptions('regions')),
- revalidate: 3600,
- };
+export const listRegions = async (): Promise<HttpTypes.StoreRegion[]> => {
+ 'use cache';
+ cacheLife('hours');
+ cacheTag(CACHE_TAGS.regions);
return sdk.store.regions
- .query({ fetchOptions: { next, cache: 'force-cache' } })
+ .query({ fetchOptions: { cache: 'no-store' } })
.then(({ regions }) => regions)
- .catch(medusaError);
+ .catch(() => {
+ cacheFailedRead();
+ return [] as HttpTypes.StoreRegion[];
+ });
};
export const retrieveRegion = async (id: string) => {
- const next = {
- ...(await getCacheOptions(['regions', id].join('-'))),
- revalidate: 3600,
- };
+ 'use cache';
+ cacheLife('hours');
+ cacheTag(CACHE_TAGS.regions);
return sdk.store.regions.$id
- .query({ $id: id, fetchOptions: { next, cache: 'force-cache' } })
+ .query({ $id: id, fetchOptions: { cache: 'no-store' } })
.then(({ region }) => region)
.catch(medusaError);
};
-const regionMap = new Map<string, HttpTypes.StoreRegion>();
-
export const getRegion = async (countryCode: string) => {
try {
- if (regionMap.has(countryCode)) {
- return regionMap.get(countryCode);
- }
-
const regions = await listRegions();
- if (!regions) {
- return null;
- }
-
+ const regionMap = new Map<string, HttpTypes.StoreRegion>();
regions.forEach(region => {
region.countries?.forEach(c => {
regionMap.set(c?.iso_2 ?? '', region);
@@ -56,3 +47,10 @@ export const getRegion = async (countryCode: string) => {
return null;
}
};
+
+export const listCountryCodes = async (): Promise<string[]> => {
+ const regions = await listRegions().catch(() => [] as HttpTypes.StoreRegion[]);
+ return regions.flatMap(region =>
+ (region.countries ?? []).map(country => country.iso_2).filter((code): code is string => !!code)
+ );
+};
diff --git a/apps/storefront/src/lib/data/seller.ts b/apps/storefront/src/lib/data/seller.ts
index 06bdc0db0..fad4797fd 100644
--- a/apps/storefront/src/lib/data/seller.ts
+++ b/apps/storefront/src/lib/data/seller.ts
@@ -1,7 +1,9 @@
import { SellerDTO } from '@mercurjs/types';
+import { cacheLife, cacheTag } from 'next/cache';
+
import { sdk } from '../client';
-import { CACHE_TAGS } from './cache-tags';
+import { CACHE_TAGS, cacheFailedRead } from './cache-tags';
const SELLER_FIELDS =
'id,name,handle,description,logo,banner,is_premium,metadata,created_at,email,phone';
@@ -9,18 +11,20 @@ const SELLER_FIELDS =
export const getSellerByHandle = async (
handle: string
): Promise<SellerDTO | null> => {
+ 'use cache';
+ cacheLife('minutes');
+ cacheTag(CACHE_TAGS.sellers, CACHE_TAGS.seller(handle));
+
return (
sdk.store.sellers.query({
handle,
fields: SELLER_FIELDS,
- fetchOptions: {
- next: {
- revalidate: 300,
- tags: [CACHE_TAGS.sellers, CACHE_TAGS.seller(handle)],
- },
- },
+ fetchOptions: { cache: 'no-store' },
} as never) as unknown as Promise<{ sellers: SellerDTO[] }>
)
.then(({ sellers }) => sellers.find((s) => s.handle === handle) ?? null)
- .catch(() => null);
+ .catch(() => {
+ cacheFailedRead();
+ return null;
+ });
};
diff --git a/apps/storefront/src/lib/helpers/base-url.ts b/apps/storefront/src/lib/helpers/base-url.ts
new file mode 100644
index 000000000..23f370519
--- /dev/null
+++ b/apps/storefront/src/lib/helpers/base-url.ts
@@ -0,0 +1,3 @@
+// Reading the host header would make every page request-time; the public URL
+// comes from the environment so pages and metadata can be prerendered.
+export const getBaseUrl = () => process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
diff --git a/apps/storefront/src/lib/helpers/check-region.ts b/apps/storefront/src/lib/helpers/check-region.ts
deleted file mode 100644
index efe4c2091..000000000
--- a/apps/storefront/src/lib/helpers/check-region.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { listRegions } from "../data/regions"
-
-export const checkRegion = async (locale: string) => {
- const regions = await listRegions()
- const countries = regions
- ?.map((r) => {
- return r.countries?.map((c) => c.iso_2)
- })
- .flat()
-
- return countries.includes(locale) ? true : false
-}
diff --git a/apps/storefront/src/lib/helpers/isBot.ts b/apps/storefront/src/lib/helpers/isBot.ts
deleted file mode 100644
index dea269128..000000000
--- a/apps/storefront/src/lib/helpers/isBot.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function isBot(ua: string) {
- return ua ? /bot|crawl|spider|slurp|bing|duckduckbot|GPTBot/i.test(ua) : true
-}
diff --git a/apps/storefront/src/middleware.ts b/apps/storefront/src/proxy.ts
similarity index 88%
rename from apps/storefront/src/middleware.ts
rename to apps/storefront/src/proxy.ts
index 585278123..d17b505ed 100644
--- a/apps/storefront/src/middleware.ts
+++ b/apps/storefront/src/proxy.ts
@@ -36,12 +36,12 @@ async function getRegionMap(cacheId: string) {
if (!BACKEND_URL) {
throw new Error(
- 'Middleware.ts: Error fetching regions. Did you set up regions in your Medusa Admin and define a MEDUSA_BACKEND_URL environment variable? Note that the variable is no longer named NEXT_PUBLIC_MEDUSA_BACKEND_URL.'
+ 'proxy.ts: Error fetching regions. Did you set up regions in your Medusa Admin and define a MEDUSA_BACKEND_URL environment variable? Note that the variable is no longer named NEXT_PUBLIC_MEDUSA_BACKEND_URL.'
);
}
if (!regionMap.keys().next().value || regionMapUpdated < Date.now() - 3600 * 1000) {
- // We can't use the JS client here because middleware is running on Edge and the client needs a Node environment.
+ // Plain fetch keeps the proxy free of the SDK and Next runtime imports.
const { regions } = await fetch(`${BACKEND_URL}/store/regions`, {
headers: {
'x-publishable-api-key': PUBLISHABLE_API_KEY!
@@ -102,13 +102,13 @@ async function getCountryCode(
} catch (error) {
if (process.env.NODE_ENV === 'development') {
console.error(
- 'Middleware.ts: Error getting the country code. Did you set up regions in your Medusa Admin and define a MEDUSA_BACKEND_URL environment variable? Note that the variable is no longer named NEXT_PUBLIC_MEDUSA_BACKEND_URL.'
+ 'proxy.ts: Error getting the country code. Did you set up regions in your Medusa Admin and define a MEDUSA_BACKEND_URL environment variable? Note that the variable is no longer named NEXT_PUBLIC_MEDUSA_BACKEND_URL.'
);
}
}
}
-export async function middleware(request: NextRequest) {
+export async function proxy(request: NextRequest) {
if (request.nextUrl.pathname.includes('.')) {
return NextResponse.next();
}
diff --git a/apps/storefront/tsconfig.json b/apps/storefront/tsconfig.json
index 5d606a9f0..b575f7dac 100644
--- a/apps/storefront/tsconfig.json
+++ b/apps/storefront/tsconfig.json
@@ -15,7 +15,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
- "jsx": "preserve",
+ "jsx": "react-jsx",
"incremental": true,
"plugins": [
{
diff --git a/bun.lock b/bun.lock
index b837101a4..ad33817a0 100644
--- a/bun.lock
+++ b/bun.lock
@@ -98,8 +98,8 @@
"@medusajs/medusa": "2.22.0",
"@medusajs/types": "2.22.0",
"@medusajs/ui": "^4.0.33",
- "@mercurjs/client": "2.3.8",
- "@mercurjs/types": "2.3.8",
+ "@mercurjs/client": "2.3.9-canary.4",
+ "@mercurjs/types": "2.3.9-canary.4",
"@stripe/react-stripe-js": "^3.7.0",
"@stripe/stripe-js": "^7.1.0",
"@talkjs/react": "^0.1.11",
@@ -111,7 +111,7 @@
"i18next-browser-languagedetector": "^8.1.0",
"js-cookie": "^3.0.5",
"lodash": "^4.17.21",
- "next": "15.5.24",
+ "next": "16.4.2",
"react": "^19.2.1",
"react-country-flag": "^3.1.0",
"react-dom": "^19.0.0",
@@ -141,7 +141,7 @@
"@types/react-dom": "^19",
"@types/sanitize-html": "^2.16.1",
"eslint": "^9",
- "eslint-config-next": "15.5.7",
+ "eslint-config-next": "16.4.2",
"eslint-plugin-storybook": "^0.11.2",
"postcss": "^8",
"prettier": "^3.5.3",
@@ -1307,6 +1307,8 @@
"@img/sharp-darwin-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.0.4" }, "os": "darwin", "cpu": "x64" }, "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q=="],
+ "@img/sharp-freebsd-wasm32": ["@img/[email protected]", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "os": "freebsd" }, "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw=="],
+
"@img/sharp-libvips-darwin-arm64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg=="],
"@img/sharp-libvips-darwin-x64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ=="],
@@ -1315,9 +1317,9 @@
"@img/sharp-libvips-linux-arm64": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA=="],
- "@img/sharp-libvips-linux-ppc64": ["@img/[email protected]", "", { "os": "linux", "cpu": "ppc64" }, "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA=="],
+ "@img/sharp-libvips-linux-ppc64": ["@img/[email protected]", "", { "os": "linux", "cpu": "ppc64" }, "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ=="],
- "@img/sharp-libvips-linux-riscv64": ["@img/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA=="],
+ "@img/sharp-libvips-linux-riscv64": ["@img/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q=="],
"@img/sharp-libvips-linux-s390x": ["@img/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA=="],
@@ -1331,9 +1333,9 @@
"@img/sharp-linux-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.0.4" }, "os": "linux", "cpu": "arm64" }, "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA=="],
- "@img/sharp-linux-ppc64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.2.4" }, "os": "linux", "cpu": "ppc64" }, "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA=="],
+ "@img/sharp-linux-ppc64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.3.4" }, "os": "linux", "cpu": "ppc64" }, "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA=="],
- "@img/sharp-linux-riscv64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.2.4" }, "os": "linux", "cpu": "none" }, "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw=="],
+ "@img/sharp-linux-riscv64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.3.4" }, "os": "linux", "cpu": "none" }, "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ=="],
"@img/sharp-linux-s390x": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.0.4" }, "os": "linux", "cpu": "s390x" }, "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q=="],
@@ -1345,7 +1347,9 @@
"@img/sharp-wasm32": ["@img/[email protected]", "", { "dependencies": { "@emnapi/runtime": "^1.2.0" }, "cpu": "none" }, "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg=="],
- "@img/sharp-win32-arm64": ["@img/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g=="],
+ "@img/sharp-webcontainers-wasm32": ["@img/[email protected]", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "cpu": "none" }, "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA=="],
+
+ "@img/sharp-win32-arm64": ["@img/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q=="],
"@img/sharp-win32-ia32": ["@img/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ=="],
@@ -1643,25 +1647,25 @@
"@napi-rs/wasm-runtime": ["@napi-rs/[email protected]", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1" } }, "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg=="],
- "@next/env": ["@next/[email protected]", "", {}, "sha512-mBDF7T0XKZjs9SpUAl0buizVO+O02ULjOvWX8o/AZo/5AGw/UAS1Zzcylmd4pqbftzmKQi+L/nB4jgBYKEAl5Q=="],
+ "@next/env": ["@next/[email protected]", "", {}, "sha512-nTUTFH7G5/J/fmpkjVLegOkqyKOP0CEsJcMsyO4UCYeN1su+YMW/MfaSErnJskL7XM+UDK6aTvslxsRCyya/sA=="],
- "@next/eslint-plugin-next": ["@next/[email protected]", "", { "dependencies": { "fast-glob": "3.3.1" } }, "sha512-DtRU2N7BkGr8r+pExfuWHwMEPX5SD57FeA6pxdgCHODo+b/UgIgjE+rgWKtJAbEbGhVZ2jtHn4g3wNhWFoNBQQ=="],
+ "@next/eslint-plugin-next": ["@next/[email protected]", "", { "dependencies": { "@eslint-community/eslint-utils": "4.9.1", "fast-glob": "3.3.1" } }, "sha512-gCTWlw0e+Y6kajpFyKKgA195jUJCRhlzJE0lV7ufe8a+ghIsANWZ0/FiJwg6DuOG1+OvRbcZDcFBoRh3mNJx0g=="],
- "@next/swc-darwin-arm64": ["@next/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-AGdNLvxZNY6eR2iSnV+6wUa8CiHTMr4F7g3uHH7fT4ICIJBE00R9u4tzN/Vuwsw0cOi8MTD2HJcTCb6siMH88Q=="],
+ "@next/swc-darwin-arm64": ["@next/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-ONkhFvZNFWlsEHOM/81AtxdyuJP2KRYKYR0JxPwvcu1AuPMMMgcL+wW2luldJvMtZwKtUxoSkCychW5wIeoYSw=="],
- "@next/swc-darwin-x64": ["@next/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-9HrQajBMmGcrrrvDfRimiCrbAPh3E6uHJmwBovYr6Yrmi9p9PZqI876BrXX280wICh3o2XwUlp4blkB0NNBqFg=="],
+ "@next/swc-darwin-x64": ["@next/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-luPCMbOsCoaF+kXJEUjmjmOZg1lC3BflhmUu+ZmW4tBu2vW/4AXak8JBFvePizGkxVmNiAw/r9ra+6UviCWtWQ=="],
- "@next/swc-linux-arm64-gnu": ["@next/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-rl9LSfE75si0WT3cDgdUC1XYCKS+TgxC+/IjitmeycrAG18X/plIP1/vy8dd/HPycYcIvE688PD7FuvEAiEAew=="],
+ "@next/swc-linux-arm64-gnu": ["@next/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-xhwFTAncJyaCNy5KqKKuKaIIdCy1/1ZV1s5S1G0hhT7wGMkDTlfJ6aQbfRFnIG/s3/kDrxQ8aycVe+c5QnP8ow=="],
- "@next/swc-linux-arm64-musl": ["@next/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-TlNAnpsjxSF3aAUtqnfmtXXf8m9sIDBlmF3c7bTAlnshUYu2U0OxN2uf5d0gcFwqHVEdivJNBcCaqNOwPGNimw=="],
+ "@next/swc-linux-arm64-musl": ["@next/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-T1PNmfbPcxr5ndtWUL/3wQtLXsz808lq6sc2GrNT5k2oquF7UyqZddHSuAewHVsWsGXe6nsl9HoN1YNriVjuSg=="],
- "@next/swc-linux-x64-gnu": ["@next/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-7dwtlhr0SLndqTG1z9ncRkbJswDZiKWlxzFyXDvJ2RDZRDRHp8zyMJ4D9UH/FgnQeXxxB6gZy2pMcIUoNKQ4pA=="],
+ "@next/swc-linux-x64-gnu": ["@next/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-N9cDUOCGtkJG5PNKDFZUF3xXndrJJcpLp121uAGjIGvO/U2p9tfdNOM9htj7+5f72l0m8rMw/cvYacUJBQoudg=="],
- "@next/swc-linux-x64-musl": ["@next/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-kGZxM+WhkYs0276lFrMkj7PRtXT3Btp6cwvfSO/cCVLxJJttB5Ccnl2niaCgUja8HgSbEVnMHpg3FJWoOJ9e/g=="],
+ "@next/swc-linux-x64-musl": ["@next/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-yY2uh1YhX6ufuYy2FCbw1dqblbhI57GLYAJfCkqD9auTv6pLrH67Uccjc3QMKBeCYAG6lkgu08ExmX1bbjejjQ=="],
- "@next/swc-win32-arm64-msvc": ["@next/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-jBDDkZ/qKAqkWivWDMkJSXUzbzV0QKRBKJjEHUAvSB97Hzw7NLzJ6yV56Lts/wjir7s4P31GYgpbS6ZL+hasAA=="],
+ "@next/swc-win32-arm64-msvc": ["@next/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-j/ArWRIHpMMB6wYLMhr2puTguBt70lNU/Cmjl9p6dTDE8DGknYJMP9PdwPk2dqpCNL/KIX9yfngDvIesxJPmsg=="],
- "@next/swc-win32-x64-msvc": ["@next/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-JqtwjvvorjacQ0spgjmUJoxySoYgPwdT1sFdQ0/zmW4iMlP2hjYlCoJIyS7o6Epb4Fug8eco3HXFoBDUCDeH7Q=="],
+ "@next/swc-win32-x64-msvc": ["@next/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-AA4edyWHDko3NCSo0x6GomsdgFb0oR1J3MXU1b5xt6FRFg4AucrMPW3S0hCe/9onU0O1BbpGQBsqo1r0Gneu1g=="],
"@nodable/entities": ["@nodable/[email protected]", "", {}, "sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA=="],
@@ -2041,8 +2045,6 @@
"@rtsao/scc": ["@rtsao/[email protected]", "", {}, "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g=="],
- "@rushstack/eslint-patch": ["@rushstack/[email protected]", "", {}, "sha512-TvZbIpeKqGQQ7X0zSCvPH9riMSFQFSggnfBjFZ1mEoILW+UuXCKwOoPcgjMwiUtRqFZ8jWhPJc4um14vC6I4ag=="],
-
"@rushstack/node-core-library": ["@rushstack/[email protected]", "", { "dependencies": { "ajv": "~8.13.0", "ajv-draft-04": "~1.0.0", "ajv-formats": "~3.0.1", "fs-extra": "~11.3.0", "import-lazy": "~4.0.0", "jju": "~1.4.0", "resolve": "~1.22.1", "semver": "~7.5.4" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-IGVhy+JgUacAdCGXKUrRhwHMTzqhWwZUI+qEPcdzsb80heOw0QPbhhoVsoiMF7Klp8eYsp7hzpScMXmOa3Uhfg=="],
"@rushstack/terminal": ["@rushstack/[email protected]", "", { "dependencies": { "@rushstack/node-core-library": "5.13.0", "supports-color": "~8.1.1" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-7Hmc0ysK5077R/IkLS9hYu0QuNafm+TbZbtYVzCMbeOdMjaRboLKrhryjwZSRJGJzu+TV1ON7qZHeqf58XfLpA=="],
@@ -3147,7 +3149,7 @@
"eslint": ["[email protected]", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.5", "@eslint/config-helpers": "^0.6.0", "@eslint/core": "^1.2.1", "@eslint/plugin-kit": "^0.7.2", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "minimatch": "^10.2.4", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-6lVbcqSodALYo+4ELD0heG6lFiFxnLMuLkiMi2qV8LMp54N8tE8FT1GMH+ev4Ti00nFjNze2+Su6DsV5OQW3Dg=="],
- "eslint-config-next": ["[email protected]", "", { "dependencies": { "@next/eslint-plugin-next": "15.5.7", "@rushstack/eslint-patch": "^1.10.3", "@typescript-eslint/eslint-plugin": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jsx-a11y": "^6.10.0", "eslint-plugin-react": "^7.37.0", "eslint-plugin-react-hooks": "^5.0.0" }, "peerDependencies": { "eslint": "^7.23.0 || ^8.0.0 || ^9.0.0", "typescript": ">=3.3.1" }, "optionalPeers": ["typescript"] }, "sha512-nU/TRGHHeG81NeLW5DeQT5t6BDUqbpsNQTvef1ld/tqHT+/zTx60/TIhKnmPISTTe++DVo+DLxDmk4rnwHaZVw=="],
+ "eslint-config-next": ["[email protected]", "", { "dependencies": { "@next/eslint-plugin-next": "16.4.2", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jsx-a11y": "^6.10.0", "eslint-plugin-react": "^7.37.0", "eslint-plugin-react-hooks": "^7.1.0", "globals": "16.4.0", "typescript-eslint": "^8.56.0" }, "peerDependencies": { "eslint": ">=9.0.0", "typescript": ">=3.3.1" }, "optionalPeers": ["typescript"] }, "sha512-P33vjcETMXc+qBjpF77TeJHZLzk6cPcTy8KjpxLucYB3mCIFIORMcZ+cBXcAiIYjE5RM7jyknEEOwMNdnx/ADQ=="],
"eslint-import-resolver-node": ["[email protected]", "", { "dependencies": { "debug": "^3.2.7", "is-core-module": "^2.16.1", "resolve": "^2.0.0-next.6" } }, "sha512-tRrKqFyCaKict5hOd244sL6EQFNycnMQnBe+j8uqGNXYzsImGbGUU4ibtoaBmv5FLwJwcFJNeg1GeVjQfbMrDQ=="],
@@ -3893,7 +3895,7 @@
"neo-async": ["[email protected]", "", {}, "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="],
- "next": ["[email protected]", "", { "dependencies": { "@next/env": "15.5.24", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.5.24", "@next/swc-darwin-x64": "15.5.24", "@next/swc-linux-arm64-gnu": "15.5.24", "@next/swc-linux-arm64-musl": "15.5.24", "@next/swc-linux-x64-gnu": "15.5.24", "@next/swc-linux-x64-musl": "15.5.24", "@next/swc-win32-arm64-msvc": "15.5.24", "@next/swc-win32-x64-msvc": "15.5.24", "sharp": "^0.34.3 || ^0.35.3" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-Y+xn8EQCoC3ZbsFPyzE+tE8XOdrWeUdUF7NeXbmg9DsgAxl5UYxlsrvgVESHTyTGigoTa1bCUrxn70F5bqt0Gw=="],
+ "next": ["[email protected]", "", { "dependencies": { "@next/env": "16.4.2", "@swc/helpers": "0.5.23", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", "postcss": "8.5.23", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "16.4.2", "@next/swc-darwin-x64": "16.4.2", "@next/swc-linux-arm64-gnu": "16.4.2", "@next/swc-linux-arm64-musl": "16.4.2", "@next/swc-linux-x64-gnu": "16.4.2", "@next/swc-linux-x64-musl": "16.4.2", "@next/swc-win32-arm64-msvc": "16.4.2", "@next/swc-win32-x64-msvc": "16.4.2", "sharp": "^0.35.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-r+oBJojfefUjOiWkBhXgLS+igxX/7BWyK59uHnyOyplMSLtBZ+QLP3okrdYTbrfrbrmNTVWLBPaHDX9KRaIt3w=="],
"no-case": ["[email protected]", "", { "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" } }, "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg=="],
@@ -5065,6 +5067,10 @@
"@ianvs/prettier-plugin-sort-imports/@babel/types": ["@babel/[email protected]", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA=="],
+ "@img/sharp-freebsd-wasm32/@img/sharp-wasm32": ["@img/[email protected]", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ=="],
+
+ "@img/sharp-webcontainers-wasm32/@img/sharp-wasm32": ["@img/[email protected]", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ=="],
+
"@inquirer/checkbox/ansi-escapes": ["[email protected]", "", { "dependencies": { "type-fest": "^0.21.3" } }, "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ=="],
"@inquirer/confirm/@inquirer/core": ["@inquirer/[email protected]", "", { "dependencies": { "@inquirer/type": "^1.1.6", "@types/mute-stream": "^0.0.4", "@types/node": "^20.10.7", "@types/wrap-ansi": "^3.0.0", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2", "cli-spinners": "^2.9.2", "cli-width": "^4.1.0", "figures": "^3.2.0", "mute-stream": "^1.0.0", "run-async": "^3.0.0", "signal-exit": "^4.1.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^6.2.0" } }, "sha512-fKi63Khkisgda3ohnskNf5uZJj+zXOaBvOllHsOkdsXRA/ubQLJQrZchFFi57NKbZzkTunXiBMdvWOv71alonw=="],
@@ -5383,6 +5389,8 @@
"@storybook/nextjs/@babel/runtime": ["@babel/[email protected]", "", {}, "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw=="],
+ "@storybook/nextjs/next": ["[email protected]", "", { "dependencies": { "@next/env": "15.5.24", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.5.24", "@next/swc-darwin-x64": "15.5.24", "@next/swc-linux-arm64-gnu": "15.5.24", "@next/swc-linux-arm64-musl": "15.5.24", "@next/swc-linux-x64-gnu": "15.5.24", "@next/swc-linux-x64-musl": "15.5.24", "@next/swc-win32-arm64-msvc": "15.5.24", "@next/swc-win32-x64-msvc": "15.5.24", "sharp": "^0.34.3 || ^0.35.3" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-Y+xn8EQCoC3ZbsFPyzE+tE8XOdrWeUdUF7NeXbmg9DsgAxl5UYxlsrvgVESHTyTGigoTa1bCUrxn70F5bqt0Gw=="],
+
"@storybook/react-docgen-typescript-plugin/find-cache-dir": ["[email protected]", "", { "dependencies": { "commondir": "^1.0.1", "make-dir": "^3.0.2", "pkg-dir": "^4.1.0" } }, "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig=="],
"@storybook/react-docgen-typescript-plugin/flat-cache": ["[email protected]", "", { "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", "rimraf": "^3.0.2" } }, "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw=="],
@@ -5577,7 +5585,7 @@
"endent/dedent": ["[email protected]", "", {}, "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA=="],
- "eslint-config-next/eslint-plugin-react-hooks": ["[email protected]", "", { "peerDependencies": { "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" } }, "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg=="],
+ "eslint-config-next/globals": ["[email protected]", "", {}, "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw=="],
"eslint-import-resolver-node/debug": ["[email protected]", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="],
@@ -5755,11 +5763,11 @@
"motion/tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
- "next/@swc/helpers": ["@swc/[email protected]", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g=="],
+ "next/@swc/helpers": ["@swc/[email protected]", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw=="],
- "next/postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="],
+ "next/postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.16", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg=="],
- "next/sharp": ["[email protected]", "", { "dependencies": { "@img/colour": "^1.0.0", "detect-libc": "^2.1.2", "semver": "^7.7.3" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.34.5", "@img/sharp-darwin-x64": "0.34.5", "@img/sharp-libvips-darwin-arm64": "1.2.4", "@img/sharp-libvips-darwin-x64": "1.2.4", "@img/sharp-libvips-linux-arm": "1.2.4", "@img/sharp-libvips-linux-arm64": "1.2.4", "@img/sharp-libvips-linux-ppc64": "1.2.4", "@img/sharp-libvips-linux-riscv64": "1.2.4", "@img/sharp-libvips-linux-s390x": "1.2.4", "@img/sharp-libvips-linux-x64": "1.2.4", "@img/sharp-libvips-linuxmusl-arm64": "1.2.4", "@img/sharp-libvips-linuxmusl-x64": "1.2.4", "@img/sharp-linux-arm": "0.34.5", "@img/sharp-linux-arm64": "0.34.5", "@img/sharp-linux-ppc64": "0.34.5", "@img/sharp-linux-riscv64": "0.34.5", "@img/sharp-linux-s390x": "0.34.5", "@img/sharp-linux-x64": "0.34.5", "@img/sharp-linuxmusl-arm64": "0.34.5", "@img/sharp-linuxmusl-x64": "0.34.5", "@img/sharp-wasm32": "0.34.5", "@img/sharp-win32-arm64": "0.34.5", "@img/sharp-win32-ia32": "0.34.5", "@img/sharp-win32-x64": "0.34.5" } }, "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg=="],
+ "next/sharp": ["[email protected]", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.5", "@img/sharp-darwin-x64": "0.35.5", "@img/sharp-freebsd-wasm32": "0.35.5", "@img/sharp-libvips-darwin-arm64": "1.3.4", "@img/sharp-libvips-darwin-x64": "1.3.4", "@img/sharp-libvips-linux-arm": "1.3.4", "@img/sharp-libvips-linux-arm64": "1.3.4", "@img/sharp-libvips-linux-ppc64": "1.3.4", "@img/sharp-libvips-linux-riscv64": "1.3.4", "@img/sharp-libvips-linux-s390x": "1.3.4", "@img/sharp-libvips-linux-x64": "1.3.4", "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", "@img/sharp-libvips-linuxmusl-x64": "1.3.4", "@img/sharp-linux-arm": "0.35.5", "@img/sharp-linux-arm64": "0.35.5", "@img/sharp-linux-ppc64": "0.35.5", "@img/sharp-linux-riscv64": "0.35.5", "@img/sharp-linux-s390x": "0.35.5", "@img/sharp-linux-x64": "0.35.5", "@img/sharp-linuxmusl-arm64": "0.35.5", "@img/sharp-linuxmusl-x64": "0.35.5", "@img/sharp-webcontainers-wasm32": "0.35.5", "@img/sharp-win32-arm64": "0.35.5", "@img/sharp-win32-ia32": "0.35.5", "@img/sharp-win32-x64": "0.35.5" } }, "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g=="],
"no-case/tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
@@ -6245,6 +6253,10 @@
"@ianvs/prettier-plugin-sort-imports/@babel/types/@babel/helper-validator-identifier": ["@babel/[email protected]", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="],
+ "@img/sharp-freebsd-wasm32/@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="],
+
+ "@img/sharp-webcontainers-wasm32/@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="],
+
"@inquirer/checkbox/ansi-escapes/type-fest": ["[email protected]", "", {}, "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="],
"@inquirer/confirm/@inquirer/core/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-ECymXOukMnOoVkC2bb1Vc/w/836DXncOg5m8Xj1RH7xSHZJWNYY6Zh7EH477vcnD5egKNNfy2RpNOmuChhFPgQ=="],
@@ -6499,6 +6511,30 @@
"@storybook/instrumenter/@vitest/utils/tinyrainbow": ["[email protected]", "", {}, "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ=="],
+ "@storybook/nextjs/next/@next/env": ["@next/[email protected]", "", {}, "sha512-mBDF7T0XKZjs9SpUAl0buizVO+O02ULjOvWX8o/AZo/5AGw/UAS1Zzcylmd4pqbftzmKQi+L/nB4jgBYKEAl5Q=="],
+
+ "@storybook/nextjs/next/@next/swc-darwin-arm64": ["@next/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-AGdNLvxZNY6eR2iSnV+6wUa8CiHTMr4F7g3uHH7fT4ICIJBE00R9u4tzN/Vuwsw0cOi8MTD2HJcTCb6siMH88Q=="],
+
+ "@storybook/nextjs/next/@next/swc-darwin-x64": ["@next/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-9HrQajBMmGcrrrvDfRimiCrbAPh3E6uHJmwBovYr6Yrmi9p9PZqI876BrXX280wICh3o2XwUlp4blkB0NNBqFg=="],
+
+ "@storybook/nextjs/next/@next/swc-linux-arm64-gnu": ["@next/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-rl9LSfE75si0WT3cDgdUC1XYCKS+TgxC+/IjitmeycrAG18X/plIP1/vy8dd/HPycYcIvE688PD7FuvEAiEAew=="],
+
+ "@storybook/nextjs/next/@next/swc-linux-arm64-musl": ["@next/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-TlNAnpsjxSF3aAUtqnfmtXXf8m9sIDBlmF3c7bTAlnshUYu2U0OxN2uf5d0gcFwqHVEdivJNBcCaqNOwPGNimw=="],
+
+ "@storybook/nextjs/next/@next/swc-linux-x64-gnu": ["@next/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-7dwtlhr0SLndqTG1z9ncRkbJswDZiKWlxzFyXDvJ2RDZRDRHp8zyMJ4D9UH/FgnQeXxxB6gZy2pMcIUoNKQ4pA=="],
+
+ "@storybook/nextjs/next/@next/swc-linux-x64-musl": ["@next/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-kGZxM+WhkYs0276lFrMkj7PRtXT3Btp6cwvfSO/cCVLxJJttB5Ccnl2niaCgUja8HgSbEVnMHpg3FJWoOJ9e/g=="],
+
+ "@storybook/nextjs/next/@next/swc-win32-arm64-msvc": ["@next/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-jBDDkZ/qKAqkWivWDMkJSXUzbzV0QKRBKJjEHUAvSB97Hzw7NLzJ6yV56Lts/wjir7s4P31GYgpbS6ZL+hasAA=="],
+
+ "@storybook/nextjs/next/@next/swc-win32-x64-msvc": ["@next/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-JqtwjvvorjacQ0spgjmUJoxySoYgPwdT1sFdQ0/zmW4iMlP2hjYlCoJIyS7o6Epb4Fug8eco3HXFoBDUCDeH7Q=="],
+
+ "@storybook/nextjs/next/@swc/helpers": ["@swc/[email protected]", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g=="],
+
+ "@storybook/nextjs/next/postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="],
+
+ "@storybook/nextjs/next/sharp": ["[email protected]", "", { "dependencies": { "@img/colour": "^1.0.0", "detect-libc": "^2.1.2", "semver": "^7.7.3" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.34.5", "@img/sharp-darwin-x64": "0.34.5", "@img/sharp-libvips-darwin-arm64": "1.2.4", "@img/sharp-libvips-darwin-x64": "1.2.4", "@img/sharp-libvips-linux-arm": "1.2.4", "@img/sharp-libvips-linux-arm64": "1.2.4", "@img/sharp-libvips-linux-ppc64": "1.2.4", "@img/sharp-libvips-linux-riscv64": "1.2.4", "@img/sharp-libvips-linux-s390x": "1.2.4", "@img/sharp-libvips-linux-x64": "1.2.4", "@img/sharp-libvips-linuxmusl-arm64": "1.2.4", "@img/sharp-libvips-linuxmusl-x64": "1.2.4", "@img/sharp-linux-arm": "0.34.5", "@img/sharp-linux-arm64": "0.34.5", "@img/sharp-linux-ppc64": "0.34.5", "@img/sharp-linux-riscv64": "0.34.5", "@img/sharp-linux-s390x": "0.34.5", "@img/sharp-linux-x64": "0.34.5", "@img/sharp-linuxmusl-arm64": "0.34.5", "@img/sharp-linuxmusl-x64": "0.34.5", "@img/sharp-wasm32": "0.34.5", "@img/sharp-win32-arm64": "0.34.5", "@img/sharp-win32-ia32": "0.34.5", "@img/sharp-win32-x64": "0.34.5" } }, "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg=="],
+
"@storybook/react-docgen-typescript-plugin/find-cache-dir/pkg-dir": ["[email protected]", "", { "dependencies": { "find-up": "^4.0.0" } }, "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ=="],
"@storybook/test/@storybook/instrumenter/@vitest/utils": ["@vitest/[email protected]", "", { "dependencies": { "@vitest/pretty-format": "2.1.9", "loupe": "^3.1.2", "tinyrainbow": "^1.2.0" } }, "sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ=="],
@@ -6751,43 +6787,45 @@
"next/@swc/helpers/tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
- "next/sharp/@img/sharp-darwin-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.2.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w=="],
+ "next/postcss/nanoid": ["[email protected]", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="],
+
+ "next/sharp/@img/sharp-darwin-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg=="],
- "next/sharp/@img/sharp-darwin-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.2.4" }, "os": "darwin", "cpu": "x64" }, "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw=="],
+ "next/sharp/@img/sharp-darwin-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.3.4" }, "os": "darwin", "cpu": "x64" }, "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw=="],
- "next/sharp/@img/sharp-libvips-darwin-arm64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g=="],
+ "next/sharp/@img/sharp-libvips-darwin-arm64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw=="],
- "next/sharp/@img/sharp-libvips-darwin-x64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg=="],
+ "next/sharp/@img/sharp-libvips-darwin-x64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ=="],
- "next/sharp/@img/sharp-libvips-linux-arm": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A=="],
+ "next/sharp/@img/sharp-libvips-linux-arm": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw=="],
- "next/sharp/@img/sharp-libvips-linux-arm64": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw=="],
+ "next/sharp/@img/sharp-libvips-linux-arm64": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A=="],
- "next/sharp/@img/sharp-libvips-linux-s390x": ["@img/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ=="],
+ "next/sharp/@img/sharp-libvips-linux-s390x": ["@img/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ=="],
- "next/sharp/@img/sharp-libvips-linux-x64": ["@img/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw=="],
+ "next/sharp/@img/sharp-libvips-linux-x64": ["@img/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw=="],
- "next/sharp/@img/sharp-libvips-linuxmusl-arm64": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw=="],
+ "next/sharp/@img/sharp-libvips-linuxmusl-arm64": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA=="],
- "next/sharp/@img/sharp-libvips-linuxmusl-x64": ["@img/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg=="],
+ "next/sharp/@img/sharp-libvips-linuxmusl-x64": ["@img/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg=="],
- "next/sharp/@img/sharp-linux-arm": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.2.4" }, "os": "linux", "cpu": "arm" }, "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw=="],
+ "next/sharp/@img/sharp-linux-arm": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.3.4" }, "os": "linux", "cpu": "arm" }, "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ=="],
- "next/sharp/@img/sharp-linux-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.2.4" }, "os": "linux", "cpu": "arm64" }, "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg=="],
+ "next/sharp/@img/sharp-linux-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64" }, "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ=="],
- "next/sharp/@img/sharp-linux-s390x": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.2.4" }, "os": "linux", "cpu": "s390x" }, "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg=="],
+ "next/sharp/@img/sharp-linux-s390x": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.3.4" }, "os": "linux", "cpu": "s390x" }, "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA=="],
- "next/sharp/@img/sharp-linux-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.2.4" }, "os": "linux", "cpu": "x64" }, "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ=="],
+ "next/sharp/@img/sharp-linux-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.3.4" }, "os": "linux", "cpu": "x64" }, "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog=="],
- "next/sharp/@img/sharp-linuxmusl-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" }, "os": "linux", "cpu": "arm64" }, "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg=="],
+ "next/sharp/@img/sharp-linuxmusl-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64" }, "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg=="],
- "next/sharp/@img/sharp-linuxmusl-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.2.4" }, "os": "linux", "cpu": "x64" }, "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q=="],
+ "next/sharp/@img/sharp-linuxmusl-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.3.4" }, "os": "linux", "cpu": "x64" }, "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A=="],
- "next/sharp/@img/sharp-wasm32": ["@img/[email protected]", "", { "dependencies": { "@emnapi/runtime": "^1.7.0" }, "cpu": "none" }, "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw=="],
+ "next/sharp/@img/sharp-win32-ia32": ["@img/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A=="],
- "next/sharp/@img/sharp-win32-ia32": ["@img/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg=="],
+ "next/sharp/@img/sharp-win32-x64": ["@img/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg=="],
- "next/sharp/@img/sharp-win32-x64": ["@img/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw=="],
+ "next/sharp/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
"parse-json/@babel/code-frame/@babel/helper-validator-identifier": ["@babel/[email protected]", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="],
@@ -7061,6 +7099,10 @@
"@ianvs/prettier-plugin-sort-imports/@babel/traverse/@babel/code-frame/@babel/helper-validator-identifier": ["@babel/[email protected]", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="],
+ "@img/sharp-freebsd-wasm32/@img/sharp-wasm32/@emnapi/runtime/tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
+
+ "@img/sharp-webcontainers-wasm32/@img/sharp-wasm32/@emnapi/runtime/tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
+
"@inquirer/confirm/@inquirer/core/@types/node/undici-types": ["[email protected]", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
"@inquirer/confirm/@inquirer/core/ansi-escapes/type-fest": ["[email protected]", "", {}, "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="],
@@ -7267,6 +7309,56 @@
"@storybook/addon-interactions/@storybook/test/@vitest/spy/tinyspy": ["[email protected]", "", {}, "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q=="],
+ "@storybook/nextjs/next/@swc/helpers/tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-darwin-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.2.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-darwin-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.2.4" }, "os": "darwin", "cpu": "x64" }, "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-libvips-darwin-arm64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-libvips-darwin-x64": ["@img/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-libvips-linux-arm": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-libvips-linux-arm64": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-libvips-linux-ppc64": ["@img/[email protected]", "", { "os": "linux", "cpu": "ppc64" }, "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-libvips-linux-riscv64": ["@img/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-libvips-linux-s390x": ["@img/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-libvips-linux-x64": ["@img/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-libvips-linuxmusl-arm64": ["@img/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-libvips-linuxmusl-x64": ["@img/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-linux-arm": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.2.4" }, "os": "linux", "cpu": "arm" }, "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-linux-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.2.4" }, "os": "linux", "cpu": "arm64" }, "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-linux-ppc64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.2.4" }, "os": "linux", "cpu": "ppc64" }, "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-linux-riscv64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.2.4" }, "os": "linux", "cpu": "none" }, "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-linux-s390x": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.2.4" }, "os": "linux", "cpu": "s390x" }, "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-linux-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.2.4" }, "os": "linux", "cpu": "x64" }, "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-linuxmusl-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" }, "os": "linux", "cpu": "arm64" }, "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-linuxmusl-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.2.4" }, "os": "linux", "cpu": "x64" }, "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-wasm32": ["@img/[email protected]", "", { "dependencies": { "@emnapi/runtime": "^1.7.0" }, "cpu": "none" }, "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-win32-arm64": ["@img/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-win32-ia32": ["@img/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg=="],
+
+ "@storybook/nextjs/next/sharp/@img/sharp-win32-x64": ["@img/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw=="],
+
"@storybook/react-docgen-typescript-plugin/find-cache-dir/pkg-dir/find-up": ["[email protected]", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="],
"@storybook/test/@storybook/instrumenter/@vitest/utils/@vitest/pretty-format": ["@vitest/[email protected]", "", { "dependencies": { "tinyrainbow": "^1.2.0" } }, "sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ=="],