Skip to content

Commit

Permalink
fix(announcements): right sidebar section
Browse files Browse the repository at this point in the history
  • Loading branch information
RobsonOlv committed Nov 10, 2023
1 parent b424981 commit a3602fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/pages/updates/announcements/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ interface Props {
branch: string
}

const DocumentationPage: NextPage<Props> = ({ serialized, branch }) => {
const NewsPage: NextPage<Props> = ({ serialized, branch }) => {
const [headings, setHeadings] = useState<Item[]>([])
const { setBranchPreview } = useContext(PreviewContext)
setBranchPreview(branch)
Expand Down Expand Up @@ -193,7 +193,7 @@ export const getStaticProps: GetStaticProps = async ({
const sidebarfallback = await getNavigation()
serialized = JSON.parse(JSON.stringify(serialized))

const sectionSelected = 'Announcements'
const sectionSelected = 'News'
const flattenedSidebar = flattenJSON(sidebarfallback)
const keyPath = getKeyByValue(flattenedSidebar, slug)
const parentsArray: string[] = []
Expand All @@ -220,4 +220,4 @@ export const getStaticProps: GetStaticProps = async ({
}
}

export default DocumentationPage
export default NewsPage
2 changes: 1 addition & 1 deletion src/utils/navigation-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ export const getParents = (
parentsArray.push(flattenedSidebar[`${el}${desiredData}`])
}
})
console.log(parentsArray)

return parentsArray
}

0 comments on commit a3602fb

Please sign in to comment.