fix: encode uri
This commit is contained in:
parent
3f0f0a8994
commit
8589fa7926
1 changed files with 2 additions and 3 deletions
|
|
@ -1,9 +1,8 @@
|
|||
import styles from "./styles.module.scss"
|
||||
import { StaticImageData } from 'next/image'
|
||||
import Link from 'next/link'
|
||||
|
||||
export type ImageCardProps = {
|
||||
src: string | StaticImageData,
|
||||
src: string,
|
||||
title: string,
|
||||
href: string
|
||||
}
|
||||
|
|
@ -11,7 +10,7 @@ export type ImageCardProps = {
|
|||
export const ImageCard = ({src, title, href}: ImageCardProps) => {
|
||||
return (
|
||||
<Link href={href}>
|
||||
<div className={styles.container} style={{ backgroundImage: `url(${src})` }}>
|
||||
<div className={styles.container} style={{ backgroundImage: `url(${encodeURI(src)})` }}>
|
||||
<div className={styles.title}>
|
||||
{title}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue