signal-desktop/ts/components/DialogExpiredBuild.tsx

35 lines
864 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 from 'react';
import type { LocalizerType } from '../types/Util';
import type { WidthBreakpoint } from './_util';
2021-09-17 22:20:49 +00:00
import { LeftPaneDialog } from './LeftPaneDialog';
import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser';
2021-09-17 22:20:49 +00:00
2023-01-18 23:31:10 +00:00
export type PropsType = {
containerWidthBreakpoint: WidthBreakpoint;
i18n: LocalizerType;
};
2022-11-18 00:45:19 +00:00
export function DialogExpiredBuild({
containerWidthBreakpoint,
i18n,
2022-11-18 00:45:19 +00:00
}: PropsType): JSX.Element | null {
return (
<LeftPaneDialog
containerWidthBreakpoint={containerWidthBreakpoint}
type="error"
onClick={() => {
openLinkInWebBrowser('https://signal.org/download/');
}}
clickLabel={i18n('upgrade')}
hasAction
>
2021-09-17 22:20:49 +00:00
{i18n('expiredWarning')}{' '}
</LeftPaneDialog>
);
2022-11-18 00:45:19 +00:00
}