Skip to content

Commit

Permalink
fix: providers/context
Browse files Browse the repository at this point in the history
  • Loading branch information
supproduction committed Jul 31, 2024
1 parent a7cd512 commit 960774b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 6 additions & 0 deletions libs/domain/content/src/services/content.providers.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { provideEntity } from '@oryx-frontend/core';
import { Provider } from '@oryx-frontend/di';
import { ExperienceAdapter } from '@oryx-frontend/experience';
import { ContentExperienceAdapter } from './adapter';
Expand All @@ -6,6 +7,7 @@ import {
storyblokProviders,
strapiProviders,
} from './cms';
import { ContentContext } from './content-context';
import { ContentService } from './content.service';
import { DefaultContentService } from './default-content.service';
import { DefaultFontService, FontService } from './font';
Expand All @@ -26,4 +28,8 @@ export const contentProviders: Provider[] = [
...contentfulProviders,
...storyblokProviders,
...strapiProviders,
provideEntity('content', {
service: ContentService,
context: ContentContext.Content,
}),
];
3 changes: 1 addition & 2 deletions libs/domain/product/src/services/product-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { Provider, inject } from '@oryx-frontend/di';
import { RouteType, RouterService } from '@oryx-frontend/router';
import { featureVersion } from '@oryx-frontend/utilities';
import { Observable, map, of, take } from 'rxjs';
import { Observable, map, of } from 'rxjs';
import { PRODUCT } from '../entity';
import { ProductQualifier } from '../models';

Expand Down Expand Up @@ -36,7 +36,6 @@ export function productContextFallbackFactory(
context = inject(ContextService)
): Observable<unknown> {
return router.current().pipe(
take(1),
map((route) =>
route.type === RouteType.Product ? route.params : undefined
)
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

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

0 comments on commit 960774b

Please sign in to comment.