File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ export type WhoisAnalyzeResult = {
69
69
creationDate : string ;
70
70
expirationDate : string ;
71
71
status : DomainStatusProps [ ] ;
72
+ nameServers : string [ ] ;
72
73
registrantOrganization : string ;
73
74
registrantProvince : string ;
74
75
registrantCountry : string ;
@@ -92,6 +93,7 @@ const initialWhoisAnalyzeResult: WhoisAnalyzeResult = {
92
93
creationDate : "Unknown" ,
93
94
expirationDate : "Unknown" ,
94
95
status : [ ] ,
96
+ nameServers : [ ] ,
95
97
registrantOrganization : "Unknown" ,
96
98
registrantProvince : "Unknown" ,
97
99
registrantCountry : "Unknown" ,
@@ -181,6 +183,9 @@ export function analyzeWhois(data: string): WhoisAnalyzeResult {
181
183
case "domain status" :
182
184
result . status . push ( analyzeDomainStatus ( value ) ) ;
183
185
break ;
186
+ case "name server" :
187
+ result . nameServers . push ( value ) ;
188
+ break ;
184
189
case "registrant name" :
185
190
result . registrantOrganization = value ;
186
191
break ;
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import {
18
18
Loader2 ,
19
19
Search ,
20
20
Send ,
21
- X ,
22
21
} from "lucide-react" ;
23
22
import React , { useEffect , useMemo } from "react" ;
24
23
import { addHistory } from "@/lib/history" ;
@@ -186,6 +185,7 @@ function ResultTable({ result }: ResultTableProps) {
186
185
} ;
187
186
188
187
const [ expand , setExpand ] = React . useState < boolean > ( false ) ;
188
+ const copy = useClipboard ( ) ;
189
189
190
190
return (
191
191
result && (
@@ -251,6 +251,25 @@ function ResultTable({ result }: ResultTableProps) {
251
251
</ div >
252
252
</ Row >
253
253
< Row name = { `Registrant Email` } value = { result . registrantEmail } />
254
+ < Row
255
+ name = { `Name Server` }
256
+ value = {
257
+ < div className = { `flex flex-col` } >
258
+ { result . nameServers . length > 0
259
+ ? result . nameServers . map ( ( ns , index ) => (
260
+ < div
261
+ key = { index }
262
+ className = { `text-secondary text-xs border cursor-pointer rounded-md px-1 py-0.5 mt-0.5 w-fit inline-flex flex-row items-center` }
263
+ onClick = { ( ) => copy ( ns ) }
264
+ >
265
+ < CopyIcon className = { `w-2.5 h-2.5 mr-1` } />
266
+ { ns }
267
+ </ div >
268
+ ) )
269
+ : "N/A" }
270
+ </ div >
271
+ }
272
+ />
254
273
</ tbody >
255
274
</ table >
256
275
)
@@ -330,7 +349,7 @@ export default function Lookup({ data, target }: Props) {
330
349
< ScrollArea className = { `w-full h-full` } >
331
350
< main
332
351
className = {
333
- "w-full min-h-full grid place-items-center px-4 md:px-6 py-8 md: pt-[10vh] md: pb-[5vh] "
352
+ "relative w-full min-h-full grid place-items-center px-4 pt-20 pb-6 "
334
353
}
335
354
>
336
355
< div
You can’t perform that action at this time.
0 commit comments