diff --git a/src/pages/resources/[id].tsx b/src/pages/resources/[id].tsx index 63bffa0..5f9b1b3 100644 --- a/src/pages/resources/[id].tsx +++ b/src/pages/resources/[id].tsx @@ -1,5 +1,5 @@ import { type InferGetStaticPropsType, type GetStaticPropsContext } from "next"; -import { GlobeAltIcon } from '@heroicons/react/24/solid'; +import { GlobeAltIcon, DocumentIcon } from '@heroicons/react/24/solid'; import { createProxySSGHelpers } from '@trpc/react-query/ssg'; import { appRouter } from "~/server/api/root"; import { prisma } from "~/server/db"; @@ -50,39 +50,46 @@ export async function getStaticProps( } const PlatformLinkButton = ({platformLink}: {platformLink: PlatformLink}) => { - switch (platformLink.platform) { - case "APP_ANDROID": { - return ( - - - {`Download - - - ) - } - case "APP_IOS": { - return ( - + const Inner = () => { + switch (platformLink.platform) { + case "APP_ANDROID": { + return ( + {`Download + ) + } + case "APP_IOS": { + return ( {`Download - - ) - } - case "PDF": { - return ( - -
+ ) + } + case "PDF": { + return ( +
+ + + Document + +
+ ) + } + case "WEBSITE": { + return ( +
Website
- - ) - } - case "WEBSITE": { - return <>; + ) + } } } + + return ( + + + + ) } const DownloadButtons = ({platformLinks}: {platformLinks: PlatformLink[]}) => { @@ -93,7 +100,7 @@ const DownloadButtons = ({platformLinks}: {platformLinks: PlatformLink[]}) => { }); return ( -
+
{buttons}
)