mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 02:50:26 +08:00
[CORL-661] Encode Story ID (#2614)
* fix: encode story ID's for URL * fix: use shared method
This commit is contained in:
@@ -5,6 +5,6 @@ export default function getModerationLink(
|
||||
storyID?: string | null
|
||||
) {
|
||||
const queuePart = queue && queue !== "default" ? `/${queue}` : "";
|
||||
const storyPart = storyID ? `/${storyID}` : "";
|
||||
const storyPart = storyID ? `/${encodeURIComponent(storyID)}` : "";
|
||||
return `${basePath}${queuePart}${storyPart}`;
|
||||
}
|
||||
|
||||
+2
-1
@@ -10,6 +10,7 @@ import React, {
|
||||
import { graphql } from "react-relay";
|
||||
|
||||
import { ModerateSearchBarContainer_story as ModerationQueuesData } from "coral-admin/__generated__/ModerateSearchBarContainer_story.graphql";
|
||||
import { getModerationLink } from "coral-admin/helpers";
|
||||
import { useEffectWhenChanged } from "coral-framework/hooks";
|
||||
import { useFetch, withFragmentContainer } from "coral-framework/lib/relay";
|
||||
import { PropTypesOf } from "coral-framework/types";
|
||||
@@ -160,7 +161,7 @@ function useSearchOptions(
|
||||
nextSearchOptions.push({
|
||||
element: (
|
||||
<Option
|
||||
href={`/admin/moderate/${e.node.id}`}
|
||||
href={getModerationLink("default", e.node.id)}
|
||||
details={e.node.metadata && e.node.metadata.author}
|
||||
>
|
||||
<GoToAriaInfo /> {e.node.metadata && e.node.metadata.title}
|
||||
|
||||
Reference in New Issue
Block a user