added clicking on urls
Summary: added clicking on links from www Reviewed By: danielbuechele Differential Revision: D12992945 fbshipit-source-id: 16444a0a64b8a6cc8b46d0f79b746cf56de25ed0
This commit is contained in:
committed by
Facebook Github Bot
parent
d159e27224
commit
0bb0d69115
@@ -4,7 +4,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {Link} from 'flipper';
|
||||
import type {DataInspectorSetValue} from './DataInspector.js';
|
||||
import {PureComponent} from 'react';
|
||||
import styled from '../../styled/index.js';
|
||||
@@ -462,7 +462,11 @@ class DataDescriptionContainer extends Component<{
|
||||
|
||||
case 'text':
|
||||
case 'string':
|
||||
return <StringValue>"{String(val || '')}"</StringValue>;
|
||||
if (val.startsWith('http://') || val.startsWith('https://')) {
|
||||
return <Link href={val}>{val}</Link>;
|
||||
} else {
|
||||
return <StringValue>"{String(val || '')}"</StringValue>;
|
||||
}
|
||||
|
||||
case 'enum':
|
||||
return <StringValue>{String(val)}</StringValue>;
|
||||
|
||||
Reference in New Issue
Block a user