From 08b5308e80a9c9c7ebc86200c4402375f9dbe0b1 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sat, 10 May 2025 00:39:27 +0200 Subject: [PATCH] feat: add image optimization settings and clean up hover card component --- next.config.ts | 10 ++++++++++ src/app/login/page.tsx | 1 - src/components/ui/hover-card.tsx | 28 ++++++++++++++-------------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/next.config.ts b/next.config.ts index 94647ad..164b423 100644 --- a/next.config.ts +++ b/next.config.ts @@ -2,6 +2,16 @@ import type { NextConfig } from 'next'; const nextConfig: NextConfig = { output: 'standalone', + images: { + remotePatterns: [ + { + protocol: 'https', + hostname: 'img1.wikia.nocookie.net', + port: '', + pathname: '/**', + }, + ], + }, }; export default nextConfig; diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index 6bd8531..987846c 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -48,7 +48,6 @@ export default async function LoginPage() { width='150' height='150' alt='dancing penguin' - unoptimized={true} > diff --git a/src/components/ui/hover-card.tsx b/src/components/ui/hover-card.tsx index e754186..5c120a9 100644 --- a/src/components/ui/hover-card.tsx +++ b/src/components/ui/hover-card.tsx @@ -1,44 +1,44 @@ -"use client" +'use client'; -import * as React from "react" -import * as HoverCardPrimitive from "@radix-ui/react-hover-card" +import * as React from 'react'; +import * as HoverCardPrimitive from '@radix-ui/react-hover-card'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; function HoverCard({ ...props }: React.ComponentProps) { - return + return ; } function HoverCardTrigger({ ...props }: React.ComponentProps) { return ( - - ) + + ); } function HoverCardContent({ className, - align = "center", + align = 'center', sideOffset = 4, ...props }: React.ComponentProps) { return ( - + - ) + ); } -export { HoverCard, HoverCardTrigger, HoverCardContent } +export { HoverCard, HoverCardTrigger, HoverCardContent };