21 lines
1.1 KiB
TypeScript
21 lines
1.1 KiB
TypeScript
// Metro module 15941 (f15942).
|
|
import { memo, useCallback } from "react";
|
|
import { setOptInChannel } from "../../../opt_in_channels/OptInChannelsActionCreators";
|
|
import NativeView from "../../../core/native/NativeView";
|
|
import { TableRow } from "../../../../design/components/TableRow/native/TableRow.native";
|
|
import { intl, t } from "../../../../intl/index.native";
|
|
import { TableRowIcon } from "../../../../design/components/TableRow/native/TableRowIcon.native";
|
|
import { ChannelListMagnifyingGlassIcon } from "../../../../design/components/Icon/native/redesign/generated/ChannelListMagnifyingGlassIcon";
|
|
const r20 = memo(function VoicePanelChannelOptInNotice(props) {
|
|
const { style, channel, analyticsSection } = props;
|
|
const callback = useCallback(() => {
|
|
setOptInChannel(channel.guild_id, channel.id, true, {
|
|
section: analyticsSection
|
|
});
|
|
}, [channel, analyticsSection]);
|
|
return <NativeView style={style}>
|
|
<TableRow label={intl.string(t["9mysCh"])} subLabel={intl.string(t.PDUCIN)} icon={<TableRowIcon IconComponent={ChannelListMagnifyingGlassIcon} />} onPress={callback} start end arrow />
|
|
</NativeView>;
|
|
});
|
|
export default r20;
|