use getModerationLink helper in moderateSearchBar (#2885)

Co-authored-by: Wyatt Johnson <wyattjoh@gmail.com>
This commit is contained in:
Tessa Thornton
2020-03-12 14:03:07 -04:00
committed by GitHub
parent 8b92878e9b
commit 75c0bad073
2 changed files with 7 additions and 2 deletions
@@ -97,7 +97,7 @@ function getContextOptionsWhenModeratingStory(
{
element: (
<Option
href={`/admin/moderate/${story.id}`}
href={getModerationLink({ storyID: story.id })}
details={story.metadata && story.metadata.author}
>
<GoToAriaInfo /> {story.metadata && story.metadata.title}
@@ -180,7 +180,10 @@ function useSearchOptions(
nextSearchOptions.push({
element: (
<Option
href={getModerationLink({ storyID: e.node.id })}
href={getModerationLink({
storyID: e.node.id,
siteID: e.node.site.id,
})}
details={
<Flex itemGutter>
<strong>{e.node.site.name}</strong>
@@ -311,6 +314,7 @@ const enhanced = withRouter(
id
site {
name
id
}
metadata {
title
@@ -26,6 +26,7 @@ const SearchStoryFetch = createFetch(
id
site {
name
id
}
metadata {
title