-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a02181e
commit 14760b3
Showing
4 changed files
with
88 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use client'; | ||
|
||
import { type FC, useEffect } from 'react'; | ||
|
||
type GlobalErrorProps = { | ||
error: Error & { digest?: string }; | ||
reset: () => void; | ||
}; | ||
|
||
const GlobalError: FC<GlobalErrorProps> = ({ error }) => { | ||
useEffect(() => { | ||
console.error(error); | ||
}, [error]); | ||
|
||
return ( | ||
<div className="mt-12 flex flex-col items-center gap-2"> | ||
<h2>Something went VERY wrong!</h2> | ||
<p className="mt-2 text-center text-sm text-muted-foreground"> | ||
Digest: {error.digest} | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default GlobalError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { FC } from 'react'; | ||
import whoiser, { type WhoisSearchResult } from 'whoiser'; | ||
|
||
import { Skeleton } from './ui/skeleton'; | ||
|
||
type WhoisQuickInfoProps = { | ||
domain: string; | ||
}; | ||
|
||
const WhoisQuickInfo: FC<WhoisQuickInfoProps> = async ({ domain }) => { | ||
const results = await whoiser(domain, { | ||
timeout: 3000, | ||
}); | ||
const firstResult = results[Object.keys(results)[0]] as WhoisSearchResult; | ||
|
||
return ( | ||
<div className="my-8 flex gap-8"> | ||
<div> | ||
<h3 className="text-xs text-muted-foreground">Registrar</h3> | ||
<p className="text-sm">{firstResult['Registrar'].toString()}</p> | ||
</div> | ||
<div> | ||
<h3 className="text-xs text-muted-foreground">Creation Date</h3> | ||
<p className="text-sm"> | ||
{new Date(firstResult['Created Date'].toString()).toLocaleDateString( | ||
'en-US' | ||
)} | ||
</p> | ||
</div> | ||
<div> | ||
<h3 className="text-xs text-muted-foreground">DNSSEC</h3> | ||
<p className="text-sm">{firstResult['DNSSEC'].toString()}</p> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default WhoisQuickInfo; | ||
|
||
export const WhoisQuickInfoPlaceholder: FC = () => ( | ||
<div className="my-8 flex gap-8"> | ||
<div> | ||
<h3 className="text-xs text-muted-foreground">Registrar</h3> | ||
<Skeleton className="mt-1 h-4 w-24 rounded-sm" /> | ||
</div> | ||
<div> | ||
<h3 className="text-xs text-muted-foreground">Creation Date</h3> | ||
<Skeleton className="w-18 mt-1 h-4 rounded-sm" /> | ||
</div> | ||
<div> | ||
<h3 className="text-xs text-muted-foreground">DNSSEC</h3> | ||
<Skeleton className="mt-1 h-4 w-16 rounded-sm" /> | ||
</div> | ||
</div> | ||
); |
14760b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
domain-digger – ./
domain-digger-git-main-wotschofsky.vercel.app
domain-digger-wotschofsky.vercel.app
digger.tools
www.digger.tools