Tec stack:
Important: there are unit tests for each business logic in tests folder:
- statistics.ts tests getLargestSelectionBySize(), getLowestAveragePriceForSize(), and getMostProductsByBrandsLessThan40()
First, install:
npm install
Second, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
Assumption: all attributes - except reduced price - for ear product are provided. In case original and reduced priced exists the statistics uses reduced prices.
npm run test
Warning: Prop className
did not match. Server: "MuiBox-root MuiBox-root-1" Client: "MuiBox-root MuiBox-root-2"
Problems occurs in layout.tsx Needs to be fixed. One possibility is disabling SSR for certain components: See also: https://stackoverflow.com/q/60060544/3437868