Skip to content

Commit

Permalink
fix: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikmv committed Jun 19, 2024
1 parent fe06d63 commit 82f9fc5
Show file tree
Hide file tree
Showing 4 changed files with 730 additions and 36 deletions.
7 changes: 5 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-06-10T07:28:02.836Z\n"
"PO-Revision-Date: 2024-06-10T07:28:02.836Z\n"
"POT-Creation-Date: 2024-06-19T13:53:21.384Z\n"
"PO-Revision-Date: 2024-06-19T13:53:21.384Z\n"

msgid "Growth Chart"
msgstr "Growth Chart"
Expand Down Expand Up @@ -46,6 +46,9 @@ msgstr "Year"
msgid "Years"
msgstr "Years"

msgid "Gender is pre-selected based on the profile"
msgstr "Gender is pre-selected based on the profile"

msgid "Months"
msgstr "Months"

Expand Down
2 changes: 1 addition & 1 deletion src/components/GrowthChart/GrowthChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const GrowthChart = ({
gender={gender}
setGender={setGender}
/>
<div className='relativ'>
<div>
<ChartSettingsButton
category={category}
dataset={dataset}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,38 @@ export const ChartSelectorDropdown = ({
handleItemChange,
isDisabled,
dataTest,
}: ChartSelectorDropdownProps) => {
const tooltipContent = i18n.t('Gender is pre-selected based on the profile');
return (
isDisabled ? (
<Tooltip openDelay={500} closeDelay={50} content={tooltipContent}>
<InputField
value={title.toString()}
disabled
inputWidth='50px'
dense
data-test={`${dataTest}-disabled-button`}
/>
</Tooltip>
) : (
<SingleSelectField
className='cursor-pointer'
onChange={({ selected }) => handleItemChange(selected)}
selected={title.toString()}
}: ChartSelectorDropdownProps) => (
isDisabled ? (
<Tooltip
openDelay={500}
closeDelay={50}
content={i18n.t('Gender is pre-selected based on the profile')}>

Check failure on line 25 in src/components/GrowthChart/GrowthChartSelector/ChartSelectorDropdown/ChartSelectorDropdown.tsx

View workflow job for this annotation

GitHub Actions / lint_code

The closing bracket must be aligned with the line containing the opening tag (expected column 9 on the next line)

<InputField
value={title.toString()}
disabled
inputWidth='50px'
dense
dataTest={`${dataTest}-button`}
>
{items.map((item) => (
<SingleSelectOption
key={item}
label={item}
value={item}
dataTest={`${dataTest}-item`}
/>
))}
</SingleSelectField>
)
);
};
data-test={`${dataTest}-disabled-button`}
/>
</Tooltip>
) : (
<SingleSelectField
className='cursor-pointer'
onChange={({ selected }) => handleItemChange(selected)}
selected={title.toString()}
dense
dataTest={`${dataTest}-button`}
>
{items.map((item) => (
<SingleSelectOption
key={item}
label={item}
value={item}
dataTest={`${dataTest}-item`}
/>
))}
</SingleSelectField>
)
);

Check failure on line 54 in src/components/GrowthChart/GrowthChartSelector/ChartSelectorDropdown/ChartSelectorDropdown.tsx

View workflow job for this annotation

GitHub Actions / lint_code

Too many blank lines at the end of file. Max of 0 allowed
Loading

0 comments on commit 82f9fc5

Please sign in to comment.