Skip to content

Commit a0293cf

Browse files
committed
Fix issues with loading
1 parent 28fc629 commit a0293cf

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

apps/site/next.config.js

+9
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ const nextConfig = {
6161
// },
6262
];
6363
},
64+
images: {
65+
remotePatterns: [
66+
{
67+
protocol: "https",
68+
hostname: "cdn.sanity.io",
69+
pathname: "/images/**",
70+
},
71+
],
72+
},
6473
};
6574

6675
module.exports = nextConfig;

apps/site/src/app/(main)/(home)/sections/Organizers/InfiniteMovingCards.tsx

+11-5
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ export const InfiniteMovingCards = ({
100100
src={boxBG}
101101
alt="Box Background"
102102
fill
103+
sizes="200px"
104+
loading="lazy"
103105
className="object-contain"
104-
priority
105106
/>
106107
</div>
107108

@@ -110,8 +111,9 @@ export const InfiniteMovingCards = ({
110111
src={box}
111112
alt="Box"
112113
fill
114+
sizes="200px"
115+
loading="lazy"
113116
className="object-contain"
114-
priority
115117
/>
116118
<div className="absolute w-full h-full flex flex-col items-center justify-center gap-0">
117119
<p className="text-sm font-medium text-gray-200 leading-tight">
@@ -128,15 +130,19 @@ export const InfiniteMovingCards = ({
128130
<div className="relative w-16 h-20 bg-black border-2 border-white overflow-hidden transition-transform group-hover:scale-105 group-hover:bg-[#006FB2]">
129131
<div
130132
className="absolute inset-0 bg-black group-hover:bg-[#006FB2]"
131-
style={{ transform: "skew(30deg) scale(1.2)" }}
133+
style={{ transform: "skew(20deg) scale(1.2)" }}
132134
>
133-
<Link href={item.link} target="_blank">
135+
<Link
136+
href={item.link}
137+
target="_blank"
138+
className="relative block w-full h-full"
139+
>
134140
<Image
135141
src={item.image}
136142
alt={item.name}
137143
fill
144+
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
138145
className="object-cover opacity-75 group-hover:opacity-100"
139-
style={{ transform: "skew(-20deg) scale(0.8)" }}
140146
/>
141147
</Link>
142148
</div>

apps/site/src/app/(main)/(home)/sections/Organizers/getOrganizers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const Organizer = z.object({
99
name: z.string(),
1010
department: z.string(),
1111
role: z.string(),
12-
image: z.string().optional(),
12+
image: SanityImageReference.optional(),
1313
link: z.string().url().optional(),
1414
});
1515

0 commit comments

Comments
 (0)