signal-desktop/ts/components/DialogExpiredBuild.tsx

38 lines
754 B
TypeScript
Raw Normal View History

// Copyright 2020-2021 Signal Messenger, LLC
2020-10-30 20:34:04 +00:00
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
import { LocalizerType } from '../types/Util';
2021-09-17 22:20:49 +00:00
import { LeftPaneDialog } from './LeftPaneDialog';
type PropsType = {
hasExpired: boolean;
i18n: LocalizerType;
};
export const DialogExpiredBuild = ({
hasExpired,
i18n,
}: PropsType): JSX.Element | null => {
if (!hasExpired) {
return null;
}
return (
2021-09-17 22:20:49 +00:00
<LeftPaneDialog type="error">
{i18n('expiredWarning')}{' '}
<a
className="LeftPaneDialog__action-text"
href="https://signal.org/download/"
rel="noreferrer"
tabIndex={-1}
target="_blank"
>
{i18n('upgrade')}
</a>
</LeftPaneDialog>
);
};