signal-desktop/ts/state/smart/RelinkDialog.tsx

27 lines
842 B
TypeScript
Raw Normal View History

2023-01-03 19:55:46 +00:00
// Copyright 2020 Signal Messenger, LLC
2020-10-30 20:34:04 +00:00
// SPDX-License-Identifier: AGPL-3.0-only
import React, { memo } from 'react';
import { useSelector } from 'react-redux';
2021-08-24 20:59:44 +00:00
import { DialogRelink } from '../../components/DialogRelink';
import { getIntl } from '../selectors/user';
import type { WidthBreakpoint } from '../../components/_util';
import { useNetworkActions } from '../ducks/network';
type SmartRelinkDialogProps = Readonly<{
containerWidthBreakpoint: WidthBreakpoint;
}>;
export const SmartRelinkDialog = memo(function SmartRelinkDialog({
containerWidthBreakpoint,
}: SmartRelinkDialogProps) {
const i18n = useSelector(getIntl);
const { relinkDevice } = useNetworkActions();
return (
<DialogRelink
i18n={i18n}
containerWidthBreakpoint={containerWidthBreakpoint}
relinkDevice={relinkDevice}
/>
);
});