More actionable notification message in case of www cert exchange failed
Summary: Improved message a bit to make it clear that VPN/Lighthouse is required on both sides - computer and mobile device. Also it will now show login link in case user is not signed in yet, because login is also required for www cert exchange. Reviewed By: passy Differential Revision: D28899558 fbshipit-source-id: 89de776f602a9f27a2c068efd8e3f08c28ec5f57
This commit is contained in:
committed by
Facebook GitHub Bot
parent
edbb41b49b
commit
90d40ac385
@@ -10,6 +10,7 @@
|
||||
import {Notification} from 'flipper-plugin';
|
||||
import {Actions} from './';
|
||||
import {getStringFromErrorLike} from '../utils';
|
||||
import React from 'react';
|
||||
|
||||
export type PluginNotification = {
|
||||
notification: Notification;
|
||||
@@ -200,7 +201,7 @@ export function removeNotification(
|
||||
|
||||
export function addErrorNotification(
|
||||
title: string,
|
||||
message: string,
|
||||
message: string | React.ReactNode,
|
||||
error?: any,
|
||||
): Action {
|
||||
// TODO: use this method for https://github.com/facebook/flipper/pull/1478/files as well
|
||||
@@ -211,7 +212,14 @@ export function addErrorNotification(
|
||||
notification: {
|
||||
id: title,
|
||||
title,
|
||||
message: error ? message + ' ' + getStringFromErrorLike(error) : message,
|
||||
message: error ? (
|
||||
<>
|
||||
<p>{message}</p>
|
||||
<p>{getStringFromErrorLike(error)}</p>
|
||||
</>
|
||||
) : (
|
||||
message
|
||||
),
|
||||
severity: 'error',
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user