diff --git a/src/services/ui/src/features/package/admin-changes/index.tsx b/src/services/ui/src/features/package/admin-changes/index.tsx index ae2ce95e47..e6a34b611c 100644 --- a/src/services/ui/src/features/package/admin-changes/index.tsx +++ b/src/services/ui/src/features/package/admin-changes/index.tsx @@ -137,7 +137,7 @@ export const AdminChanges = () => { return ( diff --git a/src/services/ui/src/features/package/hooks.tsx b/src/services/ui/src/features/package/hooks.tsx index 08ccac92af..9039853522 100644 --- a/src/services/ui/src/features/package/hooks.tsx +++ b/src/services/ui/src/features/package/hooks.tsx @@ -1,5 +1,4 @@ import { useGetItem } from "@/api"; -import { removeUnderscoresAndCapitalize } from "@/utils"; import { useLayoutEffect, useState } from "react"; export type DetailsSidebarLink = { @@ -16,19 +15,22 @@ export const useDetailsSidebarLinks = ( useLayoutEffect(() => { const ids = [ - "package_detailss", - "package_activity", - "administrative_package_changess", + { id: "package_details", label: "Package Details" }, + { id: "package_activity", label: "Package Activity" }, + { + id: "administrative_package_changes", + label: "Administrative Package Changes", + }, ]; // Check if dataId is not undefined before proceeding if (data?._id) { const links = ids - .filter((id) => document.getElementById(id) != null) - .map((id) => ({ - id, - href: `?id=${encodeURIComponent(dataId)}#${id}`, - displayName: removeUnderscoresAndCapitalize(id), + .filter(({ id }) => document.getElementById(id) !== null) + .map((link) => ({ + id: link.id, + href: `#${link.id}`, + displayName: link.label, })); setSideBarLinks(links); diff --git a/src/services/ui/src/features/package/package-details/index.tsx b/src/services/ui/src/features/package/package-details/index.tsx index b20935ff40..80e5ed1e19 100644 --- a/src/services/ui/src/features/package/package-details/index.tsx +++ b/src/services/ui/src/features/package/package-details/index.tsx @@ -45,15 +45,9 @@ export const PackageDetails: FC<{ title: string; }> = (props) => { const { data } = usePackageDetailsCache(); - // const title = props.title || `${data.authority} Package Details`; - // andies thoughts: - // abstract out the grid container from the Details Item Grid components - // instead make the items just the "cells in the grid" - // add some sort of logic for the description to conditionally make it take up 2 cells - // ^ if it takes up 2 cells it must be on its own row return ( - +
- {/* */}