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 @@ -13,7 +13,6 @@ import { makeSolutionsProps } from './strapi/makeProps/makeSolutions';
1313import { makeSolutionListPageProps } from './strapi/makeProps/makeSolutionListPage' ;
1414import { fetchSolutionListPage } from './strapi/fetches/fetchSolutionListPage' ;
1515
16- import { ProductRepository } from '@/lib/product' ;
1716import { makeGuideListPagesProps } from './strapi/makeProps/makeGuideListPages' ;
1817import { makeGuidesProps } from './strapi/makeProps/makeGuides' ;
1918import { fetchOverviews } from '@/lib/strapi/fetches/fetchOverviews' ;
@@ -64,11 +63,6 @@ export const getWebinarsProps = async (locale: string) => {
6463 return makeWebinarsProps ( strapiWebinars ) ;
6564} ;
6665
67- export const getProductsProps = async ( locale : string ) => {
68- const products = await ProductRepository . getAll ( locale ) ;
69- return [ ...products ] ;
70- } ;
71-
7266export const getWebinarCategoriesProps = async ( locale : string ) => {
7367 const strapiWebinarCategories = await fetchWebinarCategories (
7468 locale ,
You can’t perform that action at this time.
0 commit comments