Skip to content

Commit

Permalink
use tabular nums for easier readability
Browse files Browse the repository at this point in the history
  • Loading branch information
aelew committed Feb 6, 2024
1 parent c0de4a5 commit 277abb4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/app/(tools)/(domain)/dns/[domain]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export default async function DNSLookupResultPage({
{match(record.type)
.with('A', 'AAAA', () => (
<Link
className="whitespace-nowrap hover:underline"
className="whitespace-nowrap tabular-nums hover:underline"
href={`/ip/${value}`}
>
{value}
Expand Down
10 changes: 6 additions & 4 deletions src/app/(tools)/(domain)/subdomain/[domain]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default async function SubdomainFinderResultPage({
)}
/>
<Link
className="whitespace-nowrap hover:underline"
className="whitespace-nowrap tabular-nums hover:underline"
href={`/ip/${record.ip}`}
>
{record.ip}
Expand All @@ -144,7 +144,9 @@ export default async function SubdomainFinderResultPage({
<TableCell className="w-36 font-medium">
Subdomains found
</TableCell>
<TableCell>{result.length}</TableCell>
<TableCell className="tabular-nums">
{result.length}
</TableCell>
</TableRow>
<TableRow>
<TableCell className="w-36 font-medium">
Expand All @@ -154,7 +156,7 @@ export default async function SubdomainFinderResultPage({
{mostCommonIp ? (
<div className="flex items-center">
<Link
className="whitespace-nowrap hover:underline"
className="whitespace-nowrap tabular-nums hover:underline"
href={`/ip/${mostCommonIp}`}
>
{mostCommonIp}
Expand Down Expand Up @@ -186,7 +188,7 @@ export default async function SubdomainFinderResultPage({
{Object.entries(ipStore)
.sort(([_, a], [__, b]) => b - a)
.map(([ip, occurrences]) => (
<TableRow key={ip}>
<TableRow className="tabular-nums" key={ip}>
<TableCell>
<div className="flex items-center">
<CloudflareIcon
Expand Down
10 changes: 5 additions & 5 deletions src/app/(tools)/(domain)/whois/[domain]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,18 @@ export default async function WhoisLookupResultPage({
}
/>
),
Updated: () => (
Expires: () => (
<Date
dateTime={
result.domain.updated_date_in_time ?? result.domain.updated_date
result.domain.expiration_date_in_time ??
result.domain.expiration_date
}
/>
),
Expires: () => (
Updated: () => (
<Date
dateTime={
result.domain.expiration_date_in_time ??
result.domain.expiration_date
result.domain.updated_date_in_time ?? result.domain.updated_date
}
/>
),
Expand Down
6 changes: 5 additions & 1 deletion src/components/date.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ export function Date({ dateTime }: DateProps) {
if (!dateTime) {
return null;
}
return <time dateTime={dateTime}>{formatDate(dateTime)}</time>;
return (
<time className="tabular-nums" dateTime={dateTime}>
{formatDate(dateTime)}
</time>
);
}

0 comments on commit 277abb4

Please sign in to comment.