From 4a0eaff31648598c70c7c5e25c4072d5029dbd1c Mon Sep 17 00:00:00 2001 From: Hanbyul Jo Date: Tue, 8 Oct 2024 14:01:09 +0100 Subject: [PATCH] Reflect comments --- app/scripts/components/stories/hub/container.tsx | 6 +++--- app/scripts/components/stories/hub/hub-content.tsx | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/scripts/components/stories/hub/container.tsx b/app/scripts/components/stories/hub/container.tsx index 5f12b6f06..1733084c1 100644 --- a/app/scripts/components/stories/hub/container.tsx +++ b/app/scripts/components/stories/hub/container.tsx @@ -21,7 +21,7 @@ import SmartLink from '$components/common/smart-link'; const allStories = Object.values(stories).map((d) => d!.data).filter(d => !d.isHidden).map((d) => ({ ...d, path: getStoryPath(d)})); -function StoriesHub() { +function StoriesHubContainer() { const controlVars = useFiltersWithQS({navigate: useNavigate()}); return ( @@ -41,7 +41,7 @@ function StoriesHub() { allStories={allStories} onFilterchanges={() => controlVars} linkProperties={{ LinkElement: SmartLink, pathAttributeKeyName: 'to'}} - storiesPagePath={STORIES_PATH} + pathname={STORIES_PATH} storiesString={{one: getString('stories').one,other: getString('stories').other}} /> @@ -49,4 +49,4 @@ function StoriesHub() { ); } -export default StoriesHub; \ No newline at end of file +export default StoriesHubContainer; \ No newline at end of file diff --git a/app/scripts/components/stories/hub/hub-content.tsx b/app/scripts/components/stories/hub/hub-content.tsx index 6eff9be6d..1352d1eb8 100644 --- a/app/scripts/components/stories/hub/hub-content.tsx +++ b/app/scripts/components/stories/hub/hub-content.tsx @@ -58,13 +58,13 @@ interface StoryDataWithPath extends StoryData {path: string} interface HubContentProps { allStories: StoryDataWithPath[]; linkProperties: LinkProperties; - storiesPagePath: string; + pathname: string; storiesString: {one: string, other: string}; onFilterchanges: () => UseFiltersWithQueryResult; } export default function HubContent(props:HubContentProps) { - const { allStories, linkProperties, storiesPagePath, storiesString, onFilterchanges } = props; + const { allStories, linkProperties, pathname, storiesString, onFilterchanges } = props; const browseControlsHeaderRef = useRef(null); const { headerHeight } = useSlidingStickyHeaderProps(); const { search, taxonomies, onAction } = onFilterchanges(); @@ -74,13 +74,13 @@ export default function HubContent(props:HubContentProps) { const ButtonLinkProps = { forwardedAs: LinkElement, - [pathAttributeKeyName]: storiesPagePath + [pathAttributeKeyName]: pathname }; function getPillLinkProps(t){ return { as: LinkElement, - [pathAttributeKeyName]: `${storiesPagePath}?${FilterActions.TAXONOMY}=${encodeURIComponent(JSON.stringify({ Topics: t.id }))}` + [pathAttributeKeyName]: `${pathname}?${FilterActions.TAXONOMY}=${encodeURIComponent(JSON.stringify({ Topics: t.id }))}` }; } const displayStories = useMemo( @@ -148,7 +148,7 @@ export default function HubContent(props:HubContentProps) { { onAction(FilterActions.TAXONOMY_MULTISELECT, { key: TAXONOMY_SOURCE,