This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,40 @@
// Metro module 15955 (f15956).
import { useCallback } from "react";
import { ComponentActions } from "../../../../Constants";
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
import Module712 from "../../../../_bundle/Module712";
import { ComponentDispatch } from "../../../../utils/ComponentDispatchUtils";
import useChatBadge from "../hooks/useChatBadge";
import NativeView from "../../../core/native/NativeView";
import VoicePanelIconButton from "../shared/VoicePanelIconButton";
import { ChatIcon } from "../../../../design/components/Icon/native/redesign/generated/ChatIcon";
import { intl, t } from "../../../../intl/index.native";
const useStyles = createStyles({
badgeContainer: {
position: "absolute",
top: -2,
right: -2
},
badge: {
width: 8,
height: 8,
borderRadius: Module712.radii.round
},
notificationBadge: {
backgroundColor: Module712.colors.BACKGROUND_FEEDBACK_NOTIFICATION
}
});
export default function VoicePanelHeaderChatButton(props) {
const channelId = props.channelId;
const styles = useStyles();
const callback = useCallback(() => {
ComponentDispatch.dispatch(ComponentActions.VOICE_PANEL_OPEN_CHAT_TAB);
}, []);
const chatBadge = useChatBadge(channelId);
return <NativeView>
<VoicePanelIconButton icon={<ChatIcon color={Module712.colors.WHITE} size="sm" />} accessibilityLabel={intl.string(t["5KxXrK"])} onPress={callback} />
{chatBadge != null && <NativeView style={styles.badgeContainer}>
<NativeView style={[styles.badge, styles.notificationBadge]} />
</NativeView>}
</NativeView>;
};