1
0
Fork 0
mirror of https://codeberg.org/MarkusThielker/next-ory.git synced 2025-04-10 11:58:41 +00:00

Update NodeImage component to use next/image for better performance and responsiveness.

This commit is contained in:
dotX12 2025-01-26 16:55:59 +03:00
parent 439fdfb84b
commit 0ac61933e6

View file

@ -1,4 +1,5 @@
import { UiNode, UiNodeImageAttributes } from '@ory/client';
import Image from 'next/image';
interface Props {
node: UiNode;
@ -7,10 +8,10 @@ interface Props {
export const NodeImage = ({ node, attributes }: Props) => {
return (
<img
<Image
src={attributes.src}
width={200}
alt={node.meta.label?.text}
alt={node.meta.label?.text || 'Image'}
/>
);
};