Skip to content

Commit

Permalink
chore: add voice message input string set
Browse files Browse the repository at this point in the history
  • Loading branch information
bang9 committed Nov 3, 2023
1 parent c30a87b commit 1d6a8e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from '@sendbird/uikit-react-native-foundation';
import { millsToMMSS } from '@sendbird/uikit-utils';

import { useLocalization } from '../../hooks/useContext';
import useVoiceMessageInput from '../../hooks/useVoiceMessageInput';
import type { FileType } from '../../platform/types';

Expand All @@ -21,6 +22,7 @@ export type VoiceMessageInputProps = {
};

const VoiceMessageInput = ({ onClose, onSend }: VoiceMessageInputProps) => {
const { STRINGS } = useLocalization();
const { colors, palette, select } = useUIKitTheme();
const { actions, state } = useVoiceMessageInput((file, duration) => onSend({ file, duration }));

Expand Down Expand Up @@ -114,7 +116,7 @@ const VoiceMessageInput = ({ onClose, onSend }: VoiceMessageInputProps) => {
<Box height={34} alignItems={'center'} justifyContent={'center'}>
{/** Cancel / Send **/}
<Box flexDirection={'row'}>
<CancelButton label={'Cancel'} onPress={onPressCancel} />
<CancelButton label={STRINGS.LABELS.VOICE_MESSAGE_INPUT_CANCEL} onPress={onPressCancel} />
<Box flex={1} />
<SendButton disabled={state.status === 'idle' || lessThanMinimumDuration} onPress={onPressSend} />
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ export interface StringSet {

/** Voice message **/
VOICE_MESSAGE: string;
VOICE_MESSAGE_INPUT_CANCEL: string;
};
FILE_VIEWER: {
TITLE: (message: SendbirdFileMessage) => string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ export const createBaseStringSet = ({ dateLocale, overrides }: StringSetCreateOp
return 'Unknown message';
},
VOICE_MESSAGE: 'Voice message',
VOICE_MESSAGE_INPUT_CANCEL: 'Cancel',
...overrides?.LABELS,
},
FILE_VIEWER: {
Expand Down

0 comments on commit 1d6a8e2

Please sign in to comment.