File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ export default async function ProjectsPage() {
1111
1212 < div className = "grid md:grid-cols-2 gap-12" >
1313 { pets . map ( ( pet ) => (
14- < Link key = { pet . _id } href = { `/projects/${ pet . slug . current } ` } className = "group" >
14+ < Link key = { pet . _id } href = { `/projects/${ pet . slug } ` } className = "group" >
1515 < div className = "overflow-hidden rounded-xl border border-border/50 bg-muted/20" >
16- { pet . coverImage ?. asset ?. url && (
16+ { pet . coverImage ?. url && (
1717 < Image
18- src = { pet . coverImage . asset . url }
18+ src = { pet . coverImage . url }
1919 alt = { pet . coverImage . alt || pet . name }
2020 width = { 800 }
2121 height = { 600 }
Original file line number Diff line number Diff line change @@ -76,11 +76,20 @@ export async function getAllPets(): Promise<Pet[]> {
7676 groq `*[_type == "pet"] | order(_createdAt asc) {
7777 _id,
7878 name,
79- slug,
80- logo { asset-> { url } },
79+ "slug": slug { current },
80+ logo {
81+ "asset": asset->{
82+ "url": url
83+ }
84+ },
8185 projectUrl,
8286 repository,
83- coverImage { alt, asset-> { url } },
87+ coverImage {
88+ alt,
89+ "asset": asset->{
90+ "url": url
91+ }
92+ },
8493 category,
8594 techStack[] {
8695 name,
You can’t perform that action at this time.
0 commit comments