fix: cover image redirect to undefined (#29311)
fixes #29310 ## Bug - [x] Related issues linked using `fixes #29310` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [x] Make sure the linting passes
This commit is contained in:
parent
0d4e4e9092
commit
797dca5913
1 changed files with 7 additions and 3 deletions
|
@ -20,9 +20,13 @@ export default function CoverImage({ title, url, slug }) {
|
|||
)
|
||||
return (
|
||||
<div className="sm:mx-0">
|
||||
<Link href={`/posts/${slug}`}>
|
||||
{slug ? <a aria-label={title}>{image}</a> : image}
|
||||
</Link>
|
||||
{slug ? (
|
||||
<Link href={`/posts/${slug}`}>
|
||||
<a aria-label={title}>{image}</a>
|
||||
</Link>
|
||||
) : (
|
||||
image
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue