Skip to content

Commit

Permalink
🔧 (package.json): specify package manager version for consistency in …
Browse files Browse the repository at this point in the history
…dependency management

♻️ (GroupCheckbox.tsx): update type for checked values in onChangeHandler for better type safety
Adding the packageManager field in package.json ensures that all developers use the same version of Yarn, promoting consistency across the development environment. Updating the type in the onChangeHandler enhances type safety by allowing both string and number types, which aligns better with the expected data structure.
  • Loading branch information
romantech committed Sep 15, 2024
1 parent 1ef6179 commit cd61cd6
Show file tree
Hide file tree
Showing 3 changed files with 2,983 additions and 2,734 deletions.
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "shopping-insight-client",
"version": "0.1.0",
"packageManager": "[email protected]",
"private": true,
"dependencies": {
"@ant-design/icons": "^4.8.0",
Expand Down
3 changes: 1 addition & 2 deletions client/src/components/forms/GroupCheckbox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Checkbox } from 'antd';
import { CheckboxValueType } from 'antd/es/checkbox/Group';

interface GroupCheckboxProps {
value: Ages[];
Expand All @@ -15,7 +14,7 @@ export default function GroupCheckbox({
callback,
paramKey,
}: GroupCheckboxProps): JSX.Element {
const onChangeHandler = (checkedValues: Array<CheckboxValueType>) => {
const onChangeHandler = (checkedValues: Array<string | number>) => {
callback(paramKey, checkedValues);
};

Expand Down
Loading

0 comments on commit cd61cd6

Please sign in to comment.