import { Link, Outlet, useLoaderData } from "remix"; import styles from '~/styles/syntax.css'; import type { Show } from './syntax/$show' import { padNumber } from "~/utils/pad"; export function links() { return [ { rel: "stylesheet", href: styles } ]; } // Server only loader function export let loader = async () => { const response = await fetch('https://syntax.fm/api/shows') const shows: Show[] = await response.json(); return { podcastName: 'The Syntax Podcast', shows, }; } export default function () { let { podcastName, shows } = useLoaderData<{podcastName: string, shows: Show[]}>(); return (