diff --git a/next.config.mjs b/next.config.mjs index 244af26..48f03d4 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,11 +1,20 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - experimental: { - serverActions: { - // edit: updated to new key. Was previously `allowedForwardedHosts` - allowedOrigins: ['localhost:3000', 'get-zen.vercel.app'], - }, + images: { + remotePatterns: [ + { + protocol: 'https', + hostname: 'raw.githubusercontent.com', + }, + ], + }, + experimental: { + serverActions: { + // edit: updated to new key. Was previously `allowedForwardedHosts` + allowedOrigins: ['localhost:3000', 'get-zen.vercel.app'], }, + + }, }; export default nextConfig; diff --git a/src/components/theme-card.tsx b/src/components/theme-card.tsx index aae70f6..988bbce 100644 --- a/src/components/theme-card.tsx +++ b/src/components/theme-card.tsx @@ -1,7 +1,7 @@ +import Image from "next/image"; import { getThemeAuthorLink, ZenTheme } from "@/lib/themes"; import styled from "styled-components"; -import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "./ui/dialog"; -import { Button } from "./ui/button"; +import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "./ui/dialog";import { Button } from "./ui/button"; const ThemeCardWrapepr = styled.div` `; @@ -15,8 +15,9 @@ export default function ThemeCard({ { if (event.target instanceof HTMLAnchorElement) return; window.open(`/themes/${theme.id}`, "_self"); - }} className="flex flex-col justify-start p-5 rounded-lg shadow-sm bg-muted dark:bg-muted/50 border border-grey-900 dark:border-muted w-full hover:shadow-lg transition duration-300 ease-in-out hover:bg-muted/100 hover:border-blue-500 cursor-pointer select-none hover:border-blue-500 hover:shadow-lg"> - {theme.name} + }} className="flex flex-col justify-start p-5 rounded-lg shadow-sm bg-muted dark:bg-muted/50 border border-grey-900 dark:border-muted w-full hover:shadow-lg transition duration-300 ease-in-out hover:bg-muted/100 hover:border-blue-500 cursor-pointer select-none "> + {theme.name}

{theme.name}

{theme.homepage && ( diff --git a/src/components/theme-page.tsx b/src/components/theme-page.tsx index 444a2b7..b8be7fd 100644 --- a/src/components/theme-page.tsx +++ b/src/components/theme-page.tsx @@ -1,3 +1,4 @@ +import Image from "next/image"; import { getThemeAuthorLink, getThemeMarkdown, ZenTheme } from "@/lib/themes"; import { Button } from "./ui/button"; import { useEffect, useState } from "react"; @@ -9,12 +10,12 @@ export default function ThemePage({ theme }: { theme: ZenTheme }) { const [readme, setReadme] = useState(null); useEffect(() => { getThemeMarkdown(theme).then(setReadme); - }, []); + }, [theme]); return ( -
+
- {theme.name} + {theme.name}

{theme.name}

{theme.description}

{theme.homepage && (