diff --git a/src/app/app.config.ts b/src/app/app.config.ts index 9b6bf20..a00ccb3 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -1,5 +1,9 @@ import { HttpRequest, provideHttpClient, withFetch, withInterceptors } from '@angular/common/http'; -import { ApplicationConfig, provideAppInitializer, provideBrowserGlobalErrorListeners } from '@angular/core'; +import { + ApplicationConfig, + provideAppInitializer, + provideBrowserGlobalErrorListeners, +} from '@angular/core'; import { provideRouter } from '@angular/router'; import { provideClientHydration, withHttpTransferCacheOptions } from '@angular/platform-browser'; @@ -8,10 +12,10 @@ import { authBootstrap } from './core/services/auth/auth-bootstrap'; import { authInterceptor } from './core/services/auth/auth.interceptor'; import { tenantBootstrap } from './core/services/tenant-bootstrap'; -function isStoreHomeProductsRequest(request: HttpRequest): boolean { +function isStoreCatalogRequest(request: HttpRequest): boolean { return ( request.method === 'GET' && - /\/api\/tenants\/[^/]+\/productos(?:\?|$)/.test(request.urlWithParams) + /\/api\/tenants\/[^/]+\/productos(?:\/\d+)?(?:\?|$)/.test(request.urlWithParams) ); } @@ -22,11 +26,11 @@ export const appConfig: ApplicationConfig = { provideClientHydration( withHttpTransferCacheOptions({ includeRequestsWithAuthHeaders: true, - filter: isStoreHomeProductsRequest - }) + filter: isStoreCatalogRequest, + }), ), provideHttpClient(withFetch(), withInterceptors([authInterceptor])), provideAppInitializer(authBootstrap), - provideAppInitializer(tenantBootstrap) - ] + provideAppInitializer(tenantBootstrap), + ], }; diff --git a/src/app/features/store/components/product-carousel/product-carousel.component.html b/src/app/features/store/components/product-carousel/product-carousel.component.html index defccde..4633bba 100644 --- a/src/app/features/store/components/product-carousel/product-carousel.component.html +++ b/src/app/features/store/components/product-carousel/product-carousel.component.html @@ -1,51 +1,70 @@