-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update codebase * fix format
- Loading branch information
Showing
23 changed files
with
2,844 additions
and
474 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
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 |
---|---|---|
@@ -1,9 +1,25 @@ | ||
'use client'; | ||
|
||
const CertsError = () => ( | ||
<div className="flex items-center justify-center"> | ||
<p className="my-8">An error occurred!</p> | ||
</div> | ||
); | ||
import { type FC, useEffect } from 'react'; | ||
|
||
type CertsErrorProps = { | ||
error: Error & { digest?: string }; | ||
reset: () => void; | ||
}; | ||
|
||
const CertsError: FC<CertsErrorProps> = ({ error }) => { | ||
useEffect(() => { | ||
console.error(error); | ||
}, [error]); | ||
|
||
return ( | ||
<div className="mt-12 flex flex-col items-center gap-2"> | ||
<h2>Something went wrong!</h2> | ||
<p className="mt-2 text-center text-sm text-muted-foreground"> | ||
Digest: {error.digest} | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CertsError; |
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 |
---|---|---|
@@ -1,9 +1,24 @@ | ||
'use client'; | ||
|
||
const DNSError = () => ( | ||
<div className="flex items-center justify-center"> | ||
<p className="my-8">An error occurred!</p> | ||
</div> | ||
); | ||
import { type FC, useEffect } from 'react'; | ||
|
||
type DNSErrorProps = { | ||
error: Error & { digest?: string }; | ||
reset: () => void; | ||
}; | ||
|
||
const DNSError: FC<DNSErrorProps> = ({ error }) => { | ||
useEffect(() => { | ||
console.error(error); | ||
}, [error]); | ||
|
||
return ( | ||
<div className="mt-12 flex flex-col items-center gap-2"> | ||
<h2>Something went wrong!</h2> | ||
<p className="mt-2 text-center text-sm text-muted-foreground"> | ||
Digest: {error.digest} | ||
</p> | ||
</div> | ||
); | ||
}; | ||
export default DNSError; |
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 |
---|---|---|
@@ -1,9 +1,25 @@ | ||
'use client'; | ||
|
||
const LookupDomainError = () => ( | ||
<div className="flex justify-center"> | ||
<p>Failed loading results!</p> | ||
</div> | ||
); | ||
import { type FC, useEffect } from 'react'; | ||
|
||
export default LookupDomainError; | ||
type DomainErrorProps = { | ||
error: Error & { digest?: string }; | ||
reset: () => void; | ||
}; | ||
|
||
const DomainError: FC<DomainErrorProps> = ({ error }) => { | ||
useEffect(() => { | ||
console.error(error); | ||
}, [error]); | ||
|
||
return ( | ||
<div className="mt-12 flex flex-col items-center gap-2"> | ||
<h2>Something went wrong!</h2> | ||
<p className="mt-2 text-center text-sm text-muted-foreground"> | ||
Digest: {error.digest} | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DomainError; |
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,77 @@ | ||
import { ImageResponse } from 'next/server'; | ||
|
||
export const runtime = 'edge'; | ||
export const contentType = 'image/png'; | ||
|
||
const interRegularFontP = fetch( | ||
new URL('https://fonts.bunny.net/inter/files/inter-latin-400-normal.woff') | ||
).then((res) => res.arrayBuffer()); | ||
|
||
const interBoldFontP = fetch( | ||
new URL('https://fonts.bunny.net/inter/files/inter-latin-700-normal.woff') | ||
).then((res) => res.arrayBuffer()); | ||
|
||
export const handler = async ({ params }: { params: { domain: string } }) => { | ||
const [interRegularFont, interBoldFont] = await Promise.all([ | ||
interRegularFontP, | ||
interBoldFontP, | ||
]); | ||
|
||
return new ImageResponse( | ||
( | ||
<div | ||
style={{ | ||
display: 'flex', | ||
width: '100%', | ||
height: '100%', | ||
flexDirection: 'column', | ||
justifyContent: 'center', | ||
gap: 16, | ||
backgroundColor: '#fff', | ||
padding: 48, | ||
}} | ||
> | ||
<span | ||
style={{ | ||
fontSize: 32, | ||
color: '#000', | ||
}} | ||
> | ||
digga | ||
</span> | ||
<span style={{ fontSize: 48, fontWeight: 700 }}> | ||
Results for {params.domain} | ||
</span> | ||
<span | ||
style={{ | ||
color: 'gray', | ||
fontSize: 32, | ||
marginTop: 32, | ||
}} | ||
> | ||
DNS records, WHOIS data, SSL/TLS certificates & more | ||
</span> | ||
</div> | ||
), | ||
{ | ||
width: 1200, | ||
height: 630, | ||
fonts: [ | ||
{ | ||
name: 'Inter', | ||
data: interRegularFont, | ||
style: 'normal', | ||
weight: 400, | ||
}, | ||
{ | ||
name: 'Inter', | ||
data: interBoldFont, | ||
style: 'normal', | ||
weight: 700, | ||
}, | ||
], | ||
} | ||
); | ||
}; | ||
|
||
export default handler; |
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 |
---|---|---|
@@ -1,9 +1,24 @@ | ||
'use client'; | ||
|
||
const WhoisError = () => ( | ||
<div className="flex items-center justify-center"> | ||
<p className="my-8">An error occurred!</p> | ||
</div> | ||
); | ||
import { type FC, useEffect } from 'react'; | ||
|
||
type WhoisErrorProps = { | ||
error: Error & { digest?: string }; | ||
reset: () => void; | ||
}; | ||
|
||
const WhoisError: FC<WhoisErrorProps> = ({ error }) => { | ||
useEffect(() => { | ||
console.error(error); | ||
}, [error]); | ||
|
||
return ( | ||
<div className="mt-12 flex flex-col items-center gap-2"> | ||
<h2>Something went wrong!</h2> | ||
<p className="mt-2 text-center text-sm text-muted-foreground"> | ||
Digest: {error.digest} | ||
</p> | ||
</div> | ||
); | ||
}; | ||
export default WhoisError; |
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,75 @@ | ||
import { ImageResponse } from 'next/server'; | ||
|
||
export const runtime = 'edge'; | ||
export const contentType = 'image/png'; | ||
|
||
const interRegularFontP = fetch( | ||
new URL('https://fonts.bunny.net/inter/files/inter-latin-400-normal.woff') | ||
).then((res) => res.arrayBuffer()); | ||
|
||
const interBoldFontP = fetch( | ||
new URL('https://fonts.bunny.net/inter/files/inter-latin-700-normal.woff') | ||
).then((res) => res.arrayBuffer()); | ||
|
||
export const handler = async () => { | ||
const [interRegularFont, interBoldFont] = await Promise.all([ | ||
interRegularFontP, | ||
interBoldFontP, | ||
]); | ||
|
||
return new ImageResponse( | ||
( | ||
<div | ||
style={{ | ||
display: 'flex', | ||
width: '100%', | ||
height: '100%', | ||
flexDirection: 'column', | ||
justifyContent: 'center', | ||
gap: 16, | ||
backgroundColor: '#fff', | ||
padding: 48, | ||
}} | ||
> | ||
<span | ||
style={{ | ||
fontSize: 48, | ||
color: '#000', | ||
fontWeight: 700, | ||
}} | ||
> | ||
digga | ||
</span> | ||
<span | ||
style={{ | ||
color: 'gray', | ||
fontSize: 32, | ||
marginTop: 32, | ||
}} | ||
> | ||
DNS records, WHOIS data, SSL/TLS certificates & more | ||
</span> | ||
</div> | ||
), | ||
{ | ||
width: 1200, | ||
height: 630, | ||
fonts: [ | ||
{ | ||
name: 'Inter', | ||
data: interRegularFont, | ||
style: 'normal', | ||
weight: 400, | ||
}, | ||
{ | ||
name: 'Inter', | ||
data: interBoldFont, | ||
style: 'normal', | ||
weight: 700, | ||
}, | ||
], | ||
} | ||
); | ||
}; | ||
|
||
export default handler; |
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,3 @@ | ||
User-agent: * | ||
Allow: / | ||
Host: https://digga.dev |
Oops, something went wrong.
10bea8b
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:
digger – ./
digger-git-main-maathis.vercel.app
digger-maathis.vercel.app
digger.vercel.app
digga.dev