Skip to content

Commit 9ea0611

Browse files
committed
small cleanup
1 parent d61bd74 commit 9ea0611

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

app/[locale]/enterprise/_components/CasesColumn.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const CasesColumn = ({
1212
className?: string
1313
}) => (
1414
<div className={cn("flex w-full flex-col gap-4", className)}>
15-
{cases.map((caseStudy) => (
16-
<CaseCard key={caseStudy.name} caseStudy={caseStudy} />
15+
{cases.map((caseStudy, index) => (
16+
<CaseCard key={index} caseStudy={caseStudy} />
1717
))}
1818
</div>
1919
)

app/[locale]/enterprise/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ const CasesSwiper = dynamic(() => import("./_components/CasesSwiper"), {
9292
// BASE_TIME_UNIT * 1000
9393
// )
9494

95-
const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
96-
const { locale } = await params
95+
const Page = async ({ params }: { params: { locale: Lang } }) => {
96+
const { locale } = params
9797

9898
const t = await getTranslations({ locale, namespace: "page-enterprise" })
9999

src/components/ui/Link.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ export const BaseLink = forwardRef<HTMLAnchorElement, LinkProps>(function Link(
107107
<Email className="me-1 inline h-6 w-6 shrink-0 align-middle" />
108108
)}
109109
{children}
110-
<VisuallyHidden>(opens in a new tab)</VisuallyHidden>
110+
<VisuallyHidden>
111+
{isMailto ? "opens email client" : "opens in a new tab"}
112+
</VisuallyHidden>
111113
{!hideArrow && !isMailto && (
112114
<RxExternalLink
113115
className={cn(

src/intl/en/page-enterprise.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"page-enterprise-": "",
32
"page-enterprise-cases-mediledger-content": "Enables Pfizer and Genentech to verify drug authenticity and ensure pharma compliance.",
43
"page-enterprise-cases-tmobile-content": "Uses Ethereum to streamline roaming and device trust—shared ledgers simplify authentication and billing.",
54
"page-enterprise-cases-unwfp-content": "UN <strong>tracks aid for 100,000+ refugees</strong> using a private Ethereum fork, boosting audit capabilities.",

src/lib/utils/url.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import {
1010
export const isDiscordInvite = (href: string): boolean =>
1111
href.includes(DISCORD_PATH) && !href.includes("http")
1212

13+
export const isMailto = (href: string): boolean => href.includes("mailto:")
14+
1315
export const isExternal = (href: string): boolean =>
1416
href.includes("http") ||
15-
href.includes("mailto:") ||
17+
isMailto(href) ||
1618
href.includes("ipfs") ||
1719
isDiscordInvite(href)
1820

19-
export const isMailto = (href: string): boolean => href.includes("mailto:")
20-
2121
export const isGlossary = (href: string): boolean =>
2222
href.includes("glossary") && href.includes("#")
2323

0 commit comments

Comments
 (0)