mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-03 11:50:19 +03:00
Add next/image
component to Universe
This commit is contained in:
parent
e599a13247
commit
d5d02f46ff
|
@ -1,6 +1,7 @@
|
|||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import classNames from 'classnames'
|
||||
import ImageNext from 'next/image'
|
||||
|
||||
import Link from './link'
|
||||
import { H5 } from './typography'
|
||||
|
@ -18,8 +19,7 @@ export default function Card({ title, to, image, header, small, onClick, childre
|
|||
<H5 className={classes.title}>
|
||||
{image && (
|
||||
<div className={classes.image}>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img src={image} width={35} alt="" />
|
||||
<ImageNext src={image} height={35} width={35} alt="" />
|
||||
</div>
|
||||
)}
|
||||
{title && (
|
||||
|
|
|
@ -51,8 +51,7 @@ export default function Title({
|
|||
|
||||
{image && (
|
||||
<div className={classes.image}>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img src={image} width={100} height={100} alt="" />
|
||||
<Image src={image} width={100} height={100} alt="" />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
@ -81,10 +81,11 @@ const UniverseContent = ({ content = [], categories, theme, pageContext, mdxComp
|
|||
}
|
||||
const url = `/universe/project/${id}`
|
||||
const header = youtube && (
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img
|
||||
<Image
|
||||
src={`https://img.youtube.com/vi/${youtube}/0.jpg`}
|
||||
alt=""
|
||||
width="480"
|
||||
height="360"
|
||||
style={{
|
||||
clipPath: 'inset(12.9% 0)',
|
||||
marginBottom: 'calc(-12.9% + 1rem)',
|
||||
|
|
Loading…
Reference in New Issue
Block a user