mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-14 16:23:43 +08:00
refactor: remove images.weserv.nl preconnect and image optimization utility
This commit is contained in:
@@ -28,9 +28,6 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<head>
|
||||
<link rel="preconnect" href="https://images.weserv.nl" />
|
||||
</head>
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
suppressHydrationWarning
|
||||
|
||||
@@ -8,7 +8,6 @@ import Image from 'next/image';
|
||||
import Link from 'next/link';
|
||||
import { Card } from '@/components/ui/Card';
|
||||
import { Icons } from '@/components/ui/Icon';
|
||||
import { getOptimizedImageUrl } from '@/lib/utils/image-utils';
|
||||
|
||||
interface DoubanMovie {
|
||||
id: string;
|
||||
@@ -41,7 +40,7 @@ export const MovieCard = memo(function MovieCard({ movie, onMovieClick, priority
|
||||
<Card hover className="overflow-hidden p-0 h-full" blur={false}>
|
||||
<div className="relative aspect-[2/3] overflow-hidden bg-[var(--glass-bg)] rounded-[var(--radius-2xl)]">
|
||||
<Image
|
||||
src={getOptimizedImageUrl(movie.cover, 400)}
|
||||
src={movie.cover}
|
||||
alt={movie.title}
|
||||
fill
|
||||
className="object-cover transition-transform duration-300 group-hover:scale-105 rounded-[var(--radius-2xl)]"
|
||||
|
||||
@@ -7,7 +7,6 @@ import { Card } from '@/components/ui/Card';
|
||||
import { Badge } from '@/components/ui/Badge';
|
||||
import { Icons } from '@/components/ui/Icon';
|
||||
import { LatencyBadge } from '@/components/ui/LatencyBadge';
|
||||
import { getOptimizedImageUrl } from '@/lib/utils/image-utils';
|
||||
|
||||
import { Video } from '@/lib/types';
|
||||
|
||||
@@ -57,7 +56,7 @@ export const VideoCard = memo<VideoCardProps>(({
|
||||
<div className="relative aspect-[2/3] bg-[color-mix(in_srgb,var(--glass-bg)_50%,transparent)] overflow-hidden rounded-[var(--radius-2xl)]">
|
||||
{video.vod_pic ? (
|
||||
<Image
|
||||
src={getOptimizedImageUrl(video.vod_pic, 400)}
|
||||
src={video.vod_pic}
|
||||
alt={video.vod_name}
|
||||
fill
|
||||
className="object-cover rounded-[var(--radius-2xl)]"
|
||||
|
||||
Reference in New Issue
Block a user