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 styles from "./styles.module.scss"
|
||||||
import { StaticImageData } from 'next/image'
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
export type ImageCardProps = {
|
export type ImageCardProps = {
|
||||||
src: string | StaticImageData,
|
src: string,
|
||||||
title: string,
|
title: string,
|
||||||
href: string
|
href: string
|
||||||
}
|
}
|
||||||
|
|
@ -11,7 +10,7 @@ export type ImageCardProps = {
|
||||||
export const ImageCard = ({src, title, href}: ImageCardProps) => {
|
export const ImageCard = ({src, title, href}: ImageCardProps) => {
|
||||||
return (
|
return (
|
||||||
<Link href={href}>
|
<Link href={href}>
|
||||||
<div className={styles.container} style={{ backgroundImage: `url(${src})` }}>
|
<div className={styles.container} style={{ backgroundImage: `url(${encodeURI(src)})` }}>
|
||||||
<div className={styles.title}>
|
<div className={styles.title}>
|
||||||
{title}
|
{title}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue