Files
discord-decomp/modules/spoiler_channels/native/VoicePanelSpoilerAlert.tsx
T
2026-11-01 12:12:55 +02:00

22 lines
1.2 KiB
TypeScript

// Metro module 12423 (f12424).
import { useDismissModalCallback, AlertActions } from "../../../design/components/AlertModal/native/AlertModal.native";
import { AlertModal, AlertActionButton } from "../../../design/components/AlertModal/native/AlertModal.native";
import { intl, t } from "../../../intl/index.native";
import GuildActionCreators from "../../../actions/GuildActionCreators";
import SelectedChannelActionCreators from "../../../actions/SelectedChannelActionCreators";
export default function VoicePanelSpoilerAlert(props) {
const channelId = props.channelId;
const dismissModalCallback = useDismissModalCallback();
return <AlertModal title={intl.string(t["q38/ae"])} content={intl.string(t["2fDWXK"])} actions={<AlertActions>
<AlertActionButton key="confirm" variant="primary" onPress={function onPress() {
GuildActionCreators.spoilerAgree(channelId);
SelectedChannelActionCreators.selectVoiceChannel(channelId);
dismissModalCallback();
}} text={intl.string(t.p89ACt)} />
<AlertActionButton key="cancel" variant="secondary" onPress={function onPress() {
dismissModalCallback();
}} text={intl.string(t["/g10LC"])} />
</AlertActions>} />;
};
export const VOICE_PANEL_SPOILER_KEY = "voice-panel-spoiler";