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:
parent
439fdfb84b
commit
0ac61933e6
1 changed files with 3 additions and 2 deletions
|
@ -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'}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue