diff --git a/ghost/sodo-search/src/components/PopupModal.js b/ghost/sodo-search/src/components/PopupModal.js
index 0fd20aadaf..dd34e705b8 100644
--- a/ghost/sodo-search/src/components/PopupModal.js
+++ b/ghost/sodo-search/src/components/PopupModal.js
@@ -165,11 +165,19 @@ function ClearButton() {
);
}
-function TagListItem({title}) {
+function TagListItem({tag}) {
+ const {name, url} = tag;
return (
-
+
{
+ if (url) {
+ window.location.href = url;
+ }
+ }}
+ >
#
-
{title}
+
{name}
);
}
@@ -183,7 +191,7 @@ function TagResults({tags}) {
return (
);
});
@@ -195,12 +203,12 @@ function TagResults({tags}) {
);
}
-function PostListItem({title, excerpt, slug}) {
- const {siteUrl} = useContext(AppContext);
+function PostListItem({post}) {
+ const {title, excerpt, url} = post;
return (
{
- if (slug) {
- window.location.href = `${siteUrl}${slug}`;
+ if (url) {
+ window.location.href = url;
}
}}>
{title}
@@ -218,9 +226,7 @@ function PostResults({posts}) {
return (
);
});
@@ -232,9 +238,17 @@ function PostResults({posts}) {
);
}
-function AuthorListItem({name, avatar}) {
+function AuthorListItem({author}) {
+ const {name, avatar, url} = author;
return (
-
+
{
+ if (url) {
+ window.location.href = url;
+ }
+ }}
+ >
{name}
@@ -262,8 +276,7 @@ function AuthorResults({authors}) {
return (
);
});