signal-desktop/ts/components/DialogExpiredBuild.tsx

35 lines
872 B
TypeScript
Raw Normal View History

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