Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 17 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"dependencies": {
"@next/third-parties": "^16.1.6",
"@sentry/nextjs": "^10.38.0",
"@spree/next": "^0.6.4",
"@spree/sdk": "^0.6.3",
"@spree/next": "^0.6.6",
"@spree/sdk": "^0.6.6",
"@stripe/react-stripe-js": "^5.6.0",
"@stripe/stripe-js": "^8.7.0",
"next": "^16",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function OrdersPage() {

useEffect(() => {
async function loadOrders() {
const response = await getOrders({ per_page: 50 });
const response = await getOrders({ limit: 50 });
// Filter to only show completed orders
setOrders(response.data.filter((o) => o.state === "complete"));
setLoading(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function ProductDetailsWrapper({
setLoading(true);
try {
const data = await getProduct(slug, {
includes: "variants,images,option_types",
expand: "variants,images,option_types",
});
if (!cancelled) {
setProduct(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default async function CategoryPage({ params }: CategoryPageProps) {

let taxon;
try {
taxon = await getTaxon(fullPermalink, { includes: "ancestors,children" });
taxon = await getTaxon(fullPermalink, { expand: "ancestors,children" });
} catch (error) {
console.error("Failed to fetch taxon:", error);
notFound();
Expand Down
4 changes: 2 additions & 2 deletions src/app/[country]/[locale]/(storefront)/taxonomies/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export default async function CategoriesPage({ params }: CategoriesPageProps) {
let taxonomies: StoreTaxonomy[] = [];
try {
const response = await getTaxonomies({
per_page: 100,
includes: "taxons",
limit: 100,
expand: "taxons",
});
taxonomies = response.data;
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/search/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function SearchBar({ basePath }: SearchBarProps) {
try {
const response = await getProducts({
multi_search: searchQuery,
per_page: 6,
limit: 6,
});
setSuggestions(response.data);
if (response.data.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useCarouselProducts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function useCarouselProducts({
setLoading(true);
setError(null);
try {
const params = { per_page: limit };
const params = { limit };

const response = taxonId
? await getTaxonProducts(taxonId, params)
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useProductListing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function useProductListing({
async (page: number, filters: ActiveFilters, query: string) => {
try {
const queryParams = buildProductQueryParams(filters, query);
return await fetchFn({ page, per_page: 12, ...queryParams });
return await fetchFn({ page, limit: 12, ...queryParams });
} catch (error) {
console.error("Failed to fetch products:", error);
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/data/countries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export async function getCountries() {
}

export async function getCountry(iso: string) {
return _getCountry(iso, { include: "states" });
return _getCountry(iso, { expand: "states" });
}
2 changes: 1 addition & 1 deletion src/lib/data/products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function getProducts(params?: ProductListParams) {

export async function getProduct(
slugOrId: string,
params?: { includes?: string },
params?: { expand?: string },
) {
return _getProduct(slugOrId, params);
}
Expand Down