// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { ReactNode } from 'react'; import React from 'react'; import moment from 'moment'; import { Modal } from './Modal'; import { Intl } from './Intl'; import type { LocalizerType } from '../types/Util'; export type PropsType = { hideWhatsNewModal: () => unknown; i18n: LocalizerType; }; type ReleaseNotesType = { date: Date; version: string; features: Array; }; // Exported so it doesn't get marked unused export function ExternalLink(props: { href: string; children: ReactNode; }): JSX.Element { return ( {props.children} ); } export function WhatsNewModal({ i18n, hideWhatsNewModal, }: PropsType): JSX.Element { let contentNode: ReactNode; const releaseNotes: ReleaseNotesType = { date: new Date(window.getBuildCreation?.() || Date.now()), version: window.getVersion?.(), features: [ , @MahdiNazemi ), }} />, @Shrinks99 ), }} />, @NetSysFire ), linkToGithub2: ( @timjamello ), linkToGithub3: ( @u32i64 ), }} />, ], }; if (releaseNotes.features.length === 1) { contentNode =

{releaseNotes.features[0]}

; } else { contentNode = (
    {releaseNotes.features.map(element => { return
  • {element}
  • ; })}
); } return ( <> {moment(releaseNotes.date).format('LL')} ·{' '} {releaseNotes.version} {contentNode} ); }