Skip to content

Commit c4bd8b9

Browse files
juliajforestiCopilot
andcommitted
review
Co-authored-by: Copilot <copilot@github.com>
1 parent 0312485 commit c4bd8b9

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

apps/meteor/client/views/omnichannel/modals/TranscriptModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const TranscriptModal = ({ email: emailDefault = '', room, onRequest, onSend, on
109109
)}
110110
/>
111111
</FieldRow>
112-
<FieldError>{errors.subject?.message}</FieldError>
112+
{errors.subject && <FieldError>{errors.subject?.message}</FieldError>}
113113
</Field>
114114
</FieldGroup>
115115
</ModalContent>

apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessagesDateTimeRow.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Box, Margins, Field, FieldLabel, InputBox } from '@rocket.chat/fuselage';
2-
import { useId, type ReactElement } from 'react';
2+
import { type ReactElement } from 'react';
33
import { useFormContext } from 'react-hook-form';
4+
import { useTranslation } from 'react-i18next';
45

56
type PruneMessagesDateTimeRowProps = {
67
label: string;
@@ -9,17 +10,15 @@ type PruneMessagesDateTimeRowProps = {
910

1011
const PruneMessagesDateTimeRow = ({ label, field }: PruneMessagesDateTimeRowProps): ReactElement => {
1112
const { register } = useFormContext();
12-
const fieldId = useId();
13+
const { t } = useTranslation();
1314

1415
return (
1516
<Field>
16-
<FieldLabel id={fieldId} flexGrow={0}>
17-
{label}
18-
</FieldLabel>
17+
<FieldLabel flexGrow={0}>{label}</FieldLabel>
1918
<Box display='flex' mi='neg-x4'>
2019
<Margins inline={4}>
21-
<InputBox aria-labelledby={fieldId} type='date' flexGrow={1} h='x20' {...register(`${field}.date`)} />
22-
<InputBox aria-labelledby={fieldId} type='time' flexGrow={1} h='x20' {...register(`${field}.time`)} />
20+
<InputBox aria-label={`${label} ${t('Date')}`} type='date' flexGrow={1} h='x20' {...register(`${field}.date`)} />
21+
<InputBox aria-label={`${label} ${t('Time')}`} type='time' flexGrow={1} h='x20' {...register(`${field}.time`)} />
2322
</Margins>
2423
</Box>
2524
</Field>

0 commit comments

Comments
 (0)