2023-01-03 11:55:46 -08:00
|
|
|
// Copyright 2020 Signal Messenger, LLC
|
2020-10-30 15:34:04 -05:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
2024-03-13 13:44:13 -07:00
|
|
|
import React, { memo } from 'react';
|
|
|
|
import { useSelector } from 'react-redux';
|
2025-09-16 17:39:03 -07:00
|
|
|
import { DialogRelink } from '../../components/DialogRelink.js';
|
|
|
|
import { getIntl } from '../selectors/user.js';
|
|
|
|
import type { WidthBreakpoint } from '../../components/_util.js';
|
|
|
|
import { useNetworkActions } from '../ducks/network.js';
|
2020-04-16 15:20:52 -04:00
|
|
|
|
2024-03-13 13:44:13 -07:00
|
|
|
type SmartRelinkDialogProps = Readonly<{
|
|
|
|
containerWidthBreakpoint: WidthBreakpoint;
|
|
|
|
}>;
|
2020-04-16 15:20:52 -04:00
|
|
|
|
2024-03-13 13:44:13 -07:00
|
|
|
export const SmartRelinkDialog = memo(function SmartRelinkDialog({
|
|
|
|
containerWidthBreakpoint,
|
|
|
|
}: SmartRelinkDialogProps) {
|
|
|
|
const i18n = useSelector(getIntl);
|
|
|
|
const { relinkDevice } = useNetworkActions();
|
|
|
|
return (
|
|
|
|
<DialogRelink
|
|
|
|
i18n={i18n}
|
|
|
|
containerWidthBreakpoint={containerWidthBreakpoint}
|
|
|
|
relinkDevice={relinkDevice}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
});
|