2021-10-22 17:41:45 -07:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
2024-05-15 14:48:02 -07:00
|
|
|
import { I18n } from './I18n';
|
2021-10-22 17:41:45 -07:00
|
|
|
|
2021-10-26 14:15:33 -05:00
|
|
|
import type { LocalizerType } from '../types/Util';
|
2021-10-22 17:41:45 -07:00
|
|
|
|
|
|
|
export type PropsType = {
|
|
|
|
i18n: LocalizerType;
|
|
|
|
showWhatsNewModal: () => unknown;
|
|
|
|
};
|
|
|
|
|
2022-11-17 16:45:19 -08:00
|
|
|
export function WhatsNewLink(props: PropsType): JSX.Element {
|
2021-10-22 17:41:45 -07:00
|
|
|
const { i18n, showWhatsNewModal } = props;
|
|
|
|
|
|
|
|
return (
|
2024-05-15 14:48:02 -07:00
|
|
|
<I18n
|
2021-10-22 17:41:45 -07:00
|
|
|
i18n={i18n}
|
2023-03-29 17:03:25 -07:00
|
|
|
id="icu:whatsNew"
|
2023-03-27 16:37:39 -07:00
|
|
|
components={{
|
|
|
|
whatsNew: (
|
|
|
|
<button
|
|
|
|
className="WhatsNew"
|
|
|
|
type="button"
|
|
|
|
onClick={showWhatsNewModal}
|
|
|
|
>
|
2023-03-29 17:03:25 -07:00
|
|
|
{i18n('icu:viewReleaseNotes')}
|
2023-03-27 16:37:39 -07:00
|
|
|
</button>
|
|
|
|
),
|
|
|
|
}}
|
2021-10-22 17:41:45 -07:00
|
|
|
/>
|
|
|
|
);
|
2022-11-17 16:45:19 -08:00
|
|
|
}
|