Skip to content

Commit c0613f2

Browse files
authored
Forms: link IP to lookup service (#45653)
* Forms: link IP to lookup service * Add tooltip and reformat url * reorganise
1 parent 0753ab9 commit c0613f2

File tree

3 files changed

+16
-1
lines changed
  • projects
    • packages/forms
    • plugins/jetpack/changelog

3 files changed

+16
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: added
3+
4+
Forms: link IP to lookup service

projects/packages/forms/src/dashboard/components/response-view/body.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* External dependencies
33
*/
4+
import { getRedirectUrl } from '@automattic/jetpack-components';
45
import apiFetch from '@wordpress/api-fetch';
56
import {
67
Button,
@@ -475,7 +476,13 @@ const ResponseViewBody = ( {
475476
<span className="jp-forms__inbox-response-meta-key ">
476477
{ __( 'IP address:', 'jetpack-forms' ) }&nbsp;
477478
</span>
478-
<span className="jp-forms__inbox-response-meta-value">{ response.ip }</span>
479+
<span className="jp-forms__inbox-response-meta-value">
480+
<Tooltip text={ __( 'Lookup IP address', 'jetpack-forms' ) }>
481+
<ExternalLink href={ getRedirectUrl( 'ip-lookup', { path: response.ip } ) }>
482+
{ response.ip }
483+
</ExternalLink>
484+
</Tooltip>
485+
</span>
479486
</div>
480487
</div>
481488

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: enhancement
3+
4+
Forms: link IP to lookup service

0 commit comments

Comments
 (0)