File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
apps/nextjs-website/src/lib Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 66 getGuideListPagesProps ,
77 getGuidePageProps ,
88 getOverviewsProps ,
9- getProductsProps ,
109 getQuickStartGuidesProps ,
1110 getReleaseNoteProps ,
1211 getSolutionListPageProps ,
@@ -27,6 +26,7 @@ import {
2726 getSolutionsMetadata ,
2827} from '@/helpers/s3Metadata.helpers' ;
2928import { s3DocsPath } from '@/config' ;
29+ import { ProductRepository } from './product' ;
3030
3131function manageUndefined < T > ( props : undefined | null | T ) {
3232 if ( ! props ) {
@@ -112,7 +112,7 @@ export async function getOverview(locale: string, productSlug?: string) {
112112}
113113
114114export async function getProducts ( locale : string ) : Promise < readonly Product [ ] > {
115- return await getProductsProps ( locale ) ;
115+ return await ProductRepository . getAll ( locale ) ;
116116}
117117
118118export async function getQuickStartGuide ( locale : string , productSlug ?: string ) {
@@ -193,7 +193,7 @@ export async function getApiDataParams(locale: string) {
193193}
194194
195195export async function getProduct ( locale : string , productSlug : string ) {
196- const props = ( await getProductsProps ( locale ) ) . find (
196+ const props = ( await ProductRepository . getAll ( locale ) ) . find (
197197 ( product ) => product . slug === productSlug
198198 ) ;
199199 return props ;
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import { makeSolutionsProps } from './strapi/makeProps/makeSolutions';
1111import { makeSolutionListPageProps } from './strapi/makeProps/makeSolutionListPage' ;
1212import { fetchSolutionListPage } from './strapi/fetches/fetchSolutionListPage' ;
1313
14- import { ProductRepository } from '@/lib/product' ;
1514import { makeGuideListPagesProps } from './strapi/makeProps/makeGuideListPages' ;
1615import { makeGuidesProps } from './strapi/makeProps/makeGuides' ;
1716import { fetchOverviews } from '@/lib/strapi/fetches/fetchOverviews' ;
@@ -62,11 +61,6 @@ export const getWebinarsProps = async (locale: string) => {
6261 return makeWebinarsProps ( strapiWebinars ) ;
6362} ;
6463
65- export const getProductsProps = async ( locale : string ) => {
66- const products = await ProductRepository . getAll ( locale ) ;
67- return [ ...products ] ;
68- } ;
69-
7064export const getWebinarCategoriesProps = async ( locale : string ) => {
7165 const strapiWebinarCategories = await fetchWebinarCategories (
7266 locale ,
You can’t perform that action at this time.
0 commit comments