mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE-Storyless): replace img with Image component for optimized loading
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
} from 'react';
|
||||
|
||||
import { cn } from '@/lib/helper';
|
||||
import Image from 'next/image';
|
||||
|
||||
export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> {
|
||||
title?: string;
|
||||
@@ -108,7 +109,7 @@ const Card = ({
|
||||
return (
|
||||
<div className={getCardClasses()} {...props}>
|
||||
<figure>
|
||||
<img
|
||||
<Image
|
||||
src={image}
|
||||
alt={imageAlt || title || 'Card image'}
|
||||
className={getImageClasses()}
|
||||
@@ -129,7 +130,7 @@ const Card = ({
|
||||
<div className={getCardClasses()} {...props}>
|
||||
{image && (
|
||||
<figure>
|
||||
<img
|
||||
<Image
|
||||
src={image}
|
||||
alt={imageAlt || title || 'Card image'}
|
||||
className={getImageClasses()}
|
||||
|
||||
Reference in New Issue
Block a user