Skip to content

Commit dc01275

Browse files
committed
a11y: turn on ssr: false with loading components
1 parent 4b4161c commit dc01275

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

app/[locale]/enterprise/SwiperHangerLoading.tsx

Lines changed: 0 additions & 10 deletions
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { useBreakpointValue } from "@/hooks/useBreakpointValue"
1111
const CasesSwiper = ({ cases }: { cases: Case[] }) => {
1212
const slidesPerView = useBreakpointValue({
1313
base: 1.2,
14-
sm: 2.4,
14+
sm: 2.2,
1515
})
1616

1717
return (

app/[locale]/enterprise/page.tsx

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ import Walmart from "@/components/icons/enterprise/walmart.svg"
3838
import WFP from "@/components/icons/enterprise/wfp.svg"
3939
import MainArticle from "@/components/MainArticle"
4040
import { ButtonLink } from "@/components/ui/buttons/Button"
41+
import { Card } from "@/components/ui/card"
42+
import { Skeleton, SkeletonLines } from "@/components/ui/skeleton"
4143

4244
import { cn } from "@/lib/utils/cn"
4345
// import { dataLoader } from "@/lib/utils/data/dataLoader"
@@ -47,7 +49,6 @@ import { getMetadata } from "@/lib/utils/metadata"
4749
import CasesColumn from "./_components/CasesColumn"
4850
import FeatureCard from "./_components/FeatureCard"
4951
import { ENTERPRISE_MAILTO } from "./constants"
50-
import SwiperHangerLoading from "./SwiperHangerLoading"
5152
import type { Case, EcosystemPlayer, Feature } from "./types"
5253
import { parseActivity } from "./utils"
5354

@@ -57,13 +58,24 @@ import EthGlyph from "@/public/images/assets/svgs/eth-diamond-rainbow.svg"
5758
import heroImage from "@/public/images/heroes/enterprise-hero-white.png"
5859

5960
const FeaturesSwiper = dynamic(() => import("./_components/FeaturesSwiper"), {
60-
// ssr: false,
61-
loading: () => <SwiperHangerLoading />,
61+
ssr: false,
62+
loading: () => (
63+
<Card className="ms-4 w-[85vw] rounded-4xl border bg-background px-2 py-6">
64+
<Skeleton className="mx-4 mb-6 size-16 rounded-xl" />
65+
<Skeleton className="mx-4 -mb-2 h-5 w-[85%]" />
66+
<SkeletonLines noOfLines={7} />
67+
</Card>
68+
),
6269
})
6370

6471
const CasesSwiper = dynamic(() => import("./_components/CasesSwiper"), {
65-
// ssr: false,
66-
loading: () => <SwiperHangerLoading />,
72+
ssr: false,
73+
loading: () => (
74+
<Card className="ms-4 w-[85vw] space-y-1 rounded-4xl border bg-background px-2 py-6">
75+
<Skeleton className="mx-4 h-5 w-[85%]" />
76+
<SkeletonLines noOfLines={4} />
77+
</Card>
78+
),
6779
})
6880

6981
// TODO: Switch back to this for cache and mock-data dev fallback
@@ -213,7 +225,7 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
213225
className: "-translate-y-1.5",
214226
},
215227
{
216-
name: "EY",
228+
name: "Ernst & Young Global Limited",
217229
Logo: EY,
218230
className: "scale-105 origin-bottom -translate-y-1.5",
219231
},
@@ -235,17 +247,17 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
235247
{ name: "SAP", Logo: SAP },
236248
{ name: "Siemens", Logo: Siemens, className: "text-[28px]" },
237249
{ name: "Sony", Logo: Sony, className: "text-[28px]" },
238-
{ name: "Sothebys", Logo: Sothebys, className: "translate-y-0.5" },
250+
{ name: "Sotheby's", Logo: Sothebys, className: "translate-y-0.5" },
239251
{ name: "Swarm", Logo: Swarm, className: "-translate-y-1" },
240-
{ name: "TMobile", Logo: TMobile },
252+
{ name: "T-Mobile", Logo: TMobile },
241253
{
242254
name: "Verizon",
243255
Logo: Verizon,
244256
className: "text-[32px] -translate-y-px",
245257
},
246258
{ name: "Visa", Logo: Visa },
247259
{ name: "Walmart", Logo: Walmart },
248-
{ name: "WFP", Logo: WFP },
260+
{ name: "World Food Programme", Logo: WFP },
249261
]
250262

251263
return (

0 commit comments

Comments
 (0)