Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
maaaathis committed Oct 21, 2023
1 parent 46a9004 commit 3c51c29
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 37 deletions.
28 changes: 14 additions & 14 deletions app/lookup/[domain]/dns/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
import { type FC, useEffect } from 'react';

type DNSErrorProps = {
error: Error & { digest?: string };
reset: () => void;
error: Error & { digest?: string };
reset: () => void;
};

const DNSError: FC<DNSErrorProps> = ({ error }) => {
useEffect(() => {
console.error(error);
}, [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>
);
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;
export default DNSError;
8 changes: 4 additions & 4 deletions app/lookup/[domain]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ const LookupLayout: FC<LookupLayoutProps> = ({
<h1 className="mb-2">
<span className="block text-muted-foreground">Results for</span>
<a
className="block text-4xl font-bold"
href={`https://${domain}`}
target="_blank"
rel="noreferrer"
className="block text-4xl font-bold"
href={`https://${domain}`}
target="_blank"
rel="noreferrer"
>
{domain} <ExternalLinkIcon className="inline-block" />
</a>
Expand Down
4 changes: 3 additions & 1 deletion components/CopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ const CopyButton: FC<CopyButton> = ({ value }) => {
}, [value, setWasCopied]);

if (wasCopied) {
return <CheckIcon className="mx-1 inline-block h-4 w-4 -translate-y-0.5 text-green-400" />;
return (
<CheckIcon className="mx-1 inline-block h-4 w-4 -translate-y-0.5 text-green-400" />
);
}

return (
Expand Down
2 changes: 1 addition & 1 deletion components/DomainLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const DomainLink: FC<DomainLinkProps> = ({ domain }) => (
<Tooltip>
<TooltipTrigger asChild>
<Link
className="underline decoration-dotted hover:decoration-dashed underline-offset-4 select-none"
className="select-none underline decoration-dotted underline-offset-4 hover:decoration-dashed"
href={`/lookup/${domain}`}
>
<span>{domain}</span>
Expand Down
2 changes: 1 addition & 1 deletion components/IpLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const IpLink: FC<IpLinkProps> = ({ value }) => {
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild onClick={open}>
<a className="cursor-pointer underline decoration-dotted hover:decoration-dashed underline-offset-4 select-none">
<a className="cursor-pointer select-none underline decoration-dotted underline-offset-4 hover:decoration-dashed">
<span className="select-all">{value}</span>
<InfoIcon
role="button"
Expand Down
32 changes: 16 additions & 16 deletions components/ResultsTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ const ResultsTabs: FC<ResultsTabsProps> = ({ domain }) => {
<ul className="-mb-px flex flex-wrap">
<li className="mr-2">
<Link
href={`/lookup/${domain}`}
className={
selectedSegment === null
? 'relative inline-block rounded-t-lg border-b-2 border-primary p-4 text-primary'
: 'relative inline-block rounded-t-lg border-b-2 border-transparent p-4 hover:border-gray-300 hover:text-gray-600 dark:hover:text-gray-300'
}
href={`/lookup/${domain}`}
className={
selectedSegment === null
? 'relative inline-block rounded-t-lg border-b-2 border-primary p-4 text-primary'
: 'relative inline-block rounded-t-lg border-b-2 border-transparent p-4 hover:border-gray-300 hover:text-gray-600 dark:hover:text-gray-300'
}
>
Overview
<span className="pointer-events-none absolute bottom-0 block translate-y-4 text-xs text-muted-foreground opacity-0 transition-all group-hover:translate-y-6 group-hover:opacity-100">
{isAppleDevice() ? (
<>
<OptionIcon
className="inline-block h-3 w-3"
strokeWidth={3}
/>
{' + 1'}
</>
<>
<OptionIcon
className="inline-block h-3 w-3"
strokeWidth={3}
/>
{' + 1'}
</>
) : (
'alt+1'
'alt+1'
)}
</span>
</Link>
Expand All @@ -58,8 +58,8 @@ const ResultsTabs: FC<ResultsTabsProps> = ({ domain }) => {
href={`/lookup/${domain}/dns`}
className={
selectedSegment === 'dns'
? 'relative inline-block rounded-t-lg border-b-2 border-primary p-4 text-primary'
: 'relative inline-block rounded-t-lg border-b-2 border-transparent p-4 hover:border-gray-300 hover:text-gray-600 dark:hover:text-gray-300'
? 'relative inline-block rounded-t-lg border-b-2 border-primary p-4 text-primary'
: 'relative inline-block rounded-t-lg border-b-2 border-transparent p-4 hover:border-gray-300 hover:text-gray-600 dark:hover:text-gray-300'
}
>
DNS
Expand Down

0 comments on commit 3c51c29

Please sign in to comment.