Skip to content

Commit 5ddc3c0

Browse files
Merge pull request #2 from DevExpress-Examples/fixes
Minor fixes in code
2 parents 3908dcc + 11371fc commit 5ddc3c0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Vue/src/assets/colorService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export const fetchColorData = async (
1919

2020
export const getRandomPastelColor = (): string => {
2121
const hue = Math.floor(Math.random() * 360);
22-
const saturation = Math.random() * 0.4 + 0.2; // 20% to 60% saturation
23-
const brightness = Math.random() * 0.3 + 0.7; // 70% to 100% brightness
22+
const saturation = Math.random() * 0.4 + 0.2;
23+
const brightness = Math.random() * 0.3 + 0.7;
2424
return hsvToHex(hue, saturation, brightness);
2525
};
2626

jQuery/src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ const renderCards = async (pageSize, pageIndex) => {
6363
const promises = hexSubset.map((hex) => fetchData(hex));
6464
try {
6565
const pageColors = await Promise.all(promises);
66-
colors = [...colors, ...pageColors];
6766
pageColors.forEach((color) => {
6867
const image = $('<img>').attr({
6968
src: color.image,
@@ -100,7 +99,7 @@ $(() => {
10099
showInfo: true,
101100
showNavigationButtons: true,
102101
itemCount: total,
103-
pageIndex: 1,
102+
pageIndex: 3,
104103
pageSize: 5,
105104
onOptionChanged: (e) => {
106105
if (e.name === 'pageSize' || e.name === 'pageIndex') {

0 commit comments

Comments
 (0)