Links pick their platform from a preset dropdown (PLATFORMS in src/lib/platforms.ts), and every link button draws that platform's icon beside its label. The footer and event cards now share the same PlatformIcon component instead of their own copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
1.4 KiB
TypeScript
29 lines
1.4 KiB
TypeScript
/* ═══════════════════════════════════════════════════════════════
|
|
LINK PLATFORMS
|
|
|
|
The preset values for links.platform. Order here is the order
|
|
the admin's Platform dropdown lists them in.
|
|
|
|
links.platform is a plain TEXT column with no CHECK: a platform
|
|
carries nothing but an icon, and an unknown value just draws a
|
|
button without one. So adding a platform is two edits, both in
|
|
code: an entry here and its icon in PlatformIcon.tsx. The type
|
|
below makes the icon list refuse to compile without it.
|
|
|
|
'instagram' is also read by splitLinks in server/src/shape.js,
|
|
which lifts the handle out for the event cards' follow button.
|
|
═══════════════════════════════════════════════════════════════ */
|
|
|
|
export const PLATFORMS = [
|
|
{ id: 'instagram', label: 'Instagram' },
|
|
{ id: 'facebook', label: 'Facebook' },
|
|
{ id: 'discord', label: 'Discord' },
|
|
{ id: 'youtube', label: 'YouTube' },
|
|
{ id: 'tiktok', label: 'TikTok' },
|
|
{ id: 'x', label: 'X (Twitter)' },
|
|
{ id: 'substack', label: 'Substack' },
|
|
{ id: 'spotify', label: 'Spotify' },
|
|
{ id: 'linkedin', label: 'LinkedIn' },
|
|
] as const
|
|
|
|
export type Platform = (typeof PLATFORMS)[number]['id']
|