Support for incoming gift badges

This commit is contained in:
Scott Nonnenberg 2022-05-11 13:59:58 -07:00 committed by GitHub
parent 6b4bea6330
commit 0ba6a0926e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 1476 additions and 164 deletions

View file

@ -0,0 +1,24 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
import type { LocalizerType } from '../types/Util';
import { Toast } from './Toast';
export type ToastPropsType = {
i18n: LocalizerType;
isIncoming: boolean;
onClose: () => unknown;
};
export const ToastCannotOpenGiftBadge = ({
i18n,
isIncoming,
onClose,
}: ToastPropsType): JSX.Element => {
const key = `message--giftBadge--unopened--toast--${
isIncoming ? 'incoming' : 'outgoing'
}`;
return <Toast onClose={onClose}>{i18n(key)}</Toast>;
};