fix(content-listings): add hasLightIcon to item schema; mark migration icons light-variant-free

GlassPanel appends -light.svg in light mode when hasLightIcon is true.
The component was unconditionally passing hasLightIcon={Boolean(item.icon)},
so migration icons (firebase, heroku, render, aws-rds, postgres, mysql, mssql)
that have no -light.svg variant rendered broken images in light mode.

Add optional hasLightIcon to the item schema and fall back to Boolean(item.icon)
when unset, preserving existing behavior for all other data files. Set
hasLightIcon: false on the seven migration icons that lack light variants.
This commit is contained in:
Nik Richers committed 2026-06-30 19:02:18 -07:00
1 parent dcf6293909
commit d2ded01130
3 files changed
+11 -1

No files matched your search

@@ -77,7 +77,7 @@ function ContentListingsGroup({ group }: { group: ContentListingGroup }) {
<GlassPanel
title={item.title}
icon={item.icon}
hasLightIcon={Boolean(item.icon)}
hasLightIcon={item.hasLightIcon ?? Boolean(item.icon)}
>
{item.description}
</GlassPanel>
@@ -35,54 +35,63 @@ export const resourcesMigrateToSupabase: ContentListingGroup = {
title: 'Firebase Auth',
href: '/guides/resources/migrating-to-supabase/firebase-auth',
icon: '/docs/img/icons/firebase-icon',
hasLightIcon: false,
description: 'Move your auth users from a Firebase project to a Supabase project.',
},
{
title: 'Firestore Data',
href: '/guides/resources/migrating-to-supabase/firestore-data',
icon: '/docs/img/icons/firebase-icon',
hasLightIcon: false,
description: 'Migrate the contents of a Firestore collection to a single Postgres table.',
},
{
title: 'Firebase Storage',
href: '/guides/resources/migrating-to-supabase/firebase-storage',
icon: '/docs/img/icons/firebase-icon',
hasLightIcon: false,
description: 'Convert your Firebase Storage files to Supabase Storage.',
},
{
title: 'Heroku',
href: '/guides/resources/migrating-to-supabase/heroku',
icon: '/docs/img/icons/heroku-icon',
hasLightIcon: false,
description: 'Migrate your Heroku Postgres database to Supabase.',
},
{
title: 'Render',
href: '/guides/resources/migrating-to-supabase/render',
icon: '/docs/img/icons/render-icon',
hasLightIcon: false,
description: 'Migrate your Render Postgres database to Supabase.',
},
{
title: 'Amazon RDS',
href: '/guides/resources/migrating-to-supabase/amazon-rds',
icon: '/docs/img/icons/aws-rds-icon',
hasLightIcon: false,
description: 'Migrate your Amazon RDS database to Supabase.',
},
{
title: 'Postgres',
href: '/guides/resources/migrating-to-supabase/postgres',
icon: '/docs/img/icons/postgres-icon',
hasLightIcon: false,
description: 'Migrate your Postgres database to Supabase.',
},
{
title: 'MySQL',
href: '/guides/resources/migrating-to-supabase/mysql',
icon: '/docs/img/icons/mysql-icon',
hasLightIcon: false,
description: 'Migrate your MySQL database to Supabase.',
},
{
title: 'Microsoft SQL Server',
href: '/guides/resources/migrating-to-supabase/mssql',
icon: '/docs/img/icons/mssql-icon',
hasLightIcon: false,
description: 'Migrate your Microsoft SQL Server database to Supabase.',
},
],
+1
View File
@@ -5,6 +5,7 @@ export const contentListingItemSchema = z.object({
href: z.string().min(1),
description: z.string().min(1),
icon: z.string().min(1).optional(),
hasLightIcon: z.boolean().optional(),
})
export const contentListingGroupTypeSchema = z.enum(['list', 'grid'])