@@ -2,6 +2,7 @@ import { CheckIcon, SearchIcon, XIcon } from 'lucide-react';
2
2
import type { Metadata } from 'next' ;
3
3
import { unstable_cache } from 'next/cache' ;
4
4
import Image from 'next/image' ;
5
+ import Link from 'next/link' ;
5
6
import { notFound } from 'next/navigation' ;
6
7
7
8
import { Button } from '@/components/ui/button' ;
@@ -72,22 +73,44 @@ export default async function IPLookupResultPage({
72
73
ISP : ( ) => (
73
74
< div className = "space-y-1" >
74
75
< div >
75
- < p > { result . asn . org } </ p >
76
+ < p className = "font-medium" > { result . asn . org } </ p >
76
77
< p className = "font-mono text-xs" > { result . asn . descr } </ p >
77
78
</ div >
78
79
< div >
79
80
< p className = "text-xs" >
80
- Abuse email: < span className = "font-mono" > { result . asn . abuse } </ span >
81
+ Abuse email:{ ' ' }
82
+ < Link
83
+ className = "font-mono hover:underline"
84
+ rel = "nofollow noopener"
85
+ target = "_blank"
86
+ href = {
87
+ result . asn . abuse . includes ( '@' )
88
+ ? `mailto:${ result . asn . abuse } `
89
+ : `https://${ result . asn . abuse } `
90
+ }
91
+ >
92
+ { result . asn . abuse }
93
+ </ Link >
81
94
</ p >
82
- < p className = "text-xs" >
95
+ < p className = "whitespace-nowrap text-xs" >
83
96
Abuse score:{ ' ' }
84
97
< span className = "font-mono" > { result . asn . abuser_score } </ span >
85
98
</ p >
86
99
</ div >
87
100
< div >
88
- < p className = "text-xs" >
89
- Domain: < span className = "font-mono" > { result . asn . domain } </ span >
90
- </ p >
101
+ { result . asn . domain && (
102
+ < p className = "text-xs" >
103
+ Domain:{ ' ' }
104
+ < Link
105
+ href = { `https://${ result . asn . domain } ` }
106
+ className = "font-mono hover:underline"
107
+ rel = "nofollow noopener"
108
+ target = "_blank"
109
+ >
110
+ { result . asn . domain }
111
+ </ Link >
112
+ </ p >
113
+ ) }
91
114
< p className = "text-xs" >
92
115
Route: < span className = "font-mono" > { result . asn . route } </ span >
93
116
</ p >
@@ -105,21 +128,30 @@ export default async function IPLookupResultPage({
105
128
return (
106
129
< div className = "space-y-1" >
107
130
< div >
108
- < p > { result . company . name } </ p >
131
+ < p className = "font-medium" > { result . company . name } </ p >
109
132
< p className = "text-xs" >
110
133
Network:{ ' ' }
111
134
< span className = "font-mono" > { result . company . network } </ span >
112
135
</ p >
113
136
</ div >
114
137
< div >
115
- < p className = "text-xs" >
138
+ < p className = "whitespace-nowrap text-xs" >
116
139
Abuse score:{ ' ' }
117
140
< span className = "font-mono" > { result . company . abuser_score } </ span >
118
141
</ p >
119
- < p className = "text-xs" >
120
- Domain:{ ' ' }
121
- < span className = "font-mono" > { result . company . domain } </ span >
122
- </ p >
142
+ { result . company . domain && (
143
+ < p className = "text-xs" >
144
+ Domain:{ ' ' }
145
+ < Link
146
+ href = { `https://${ result . company . domain } ` }
147
+ className = "font-mono hover:underline"
148
+ rel = "nofollow noopener"
149
+ target = "_blank"
150
+ >
151
+ { result . company . domain }
152
+ </ Link >
153
+ </ p >
154
+ ) }
123
155
< p className = "text-xs" >
124
156
Type:{ ' ' }
125
157
< span className = "font-mono" >
@@ -131,7 +163,7 @@ export default async function IPLookupResultPage({
131
163
) ;
132
164
} ,
133
165
Properties : ( ) => (
134
- < div className = "grid max-w-96 grid-cols-4 gap-1" >
166
+ < div className = "grid grid-cols-2 gap-1 lg:grid-cols-4 " >
135
167
{ properties . map ( ( property ) => {
136
168
const PropertyIcon = property . value ? CheckIcon : XIcon ;
137
169
return (
@@ -201,7 +233,7 @@ export default async function IPLookupResultPage({
201
233
}
202
234
return (
203
235
< TableRow key = { label } >
204
- < TableCell className = "w-36 whitespace-nowrap align-top font-medium" >
236
+ < TableCell className = "whitespace-nowrap align-top font-medium" >
205
237
{ label }
206
238
</ TableCell >
207
239
< TableCell > { val } </ TableCell >
0 commit comments