Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

497- Nav bug: clicking on Privacy Request breadcrumb takes me to Home instead of /privacy-requests #2141

Merged
merged 2 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The types of changes are:
### Fixed

* Remove next-auth from privacy center to fix JS console error [#2090](https://github.com/ethyca/fides/pull/2090)
* Nav bug: clicking on Privacy Request breadcrumb takes me to Home instead of /privacy-requests [#497](https://github.com/ethyca/fides/pull/2141)

## [2.4.0](https://github.com/ethyca/fides/compare/2.3.1...2.4.0)

Expand Down
11 changes: 9 additions & 2 deletions clients/admin-ui/src/pages/subject-request/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import { useRouter } from "next/router";
import { useGetAllPrivacyRequestsQuery } from "privacy-requests/index";
import SubjectRequest from "subject-request/SubjectRequest";

import { useFeatures } from "~/features/common/features";
import Layout from "~/features/common/Layout";

import { INDEX_ROUTE } from "../../constants";
import { INDEX_ROUTE, PRIVACY_REQUESTS_ROUTE } from "../../constants";

const useSubjectRequestDetails = () => {
const router = useRouter();
Expand All @@ -35,6 +36,9 @@ const useSubjectRequestDetails = () => {
};

const SubjectRequestDetails: NextPage = () => {
const {
flags: { navV2 },
} = useFeatures();
const { data, isLoading, isUninitialized } = useSubjectRequestDetails();
let body =
!data || data?.items.length === 0 ? (
Expand All @@ -58,7 +62,10 @@ const SubjectRequestDetails: NextPage = () => {
<Box mt={2} mb={9}>
<Breadcrumb fontWeight="medium" fontSize="sm">
<BreadcrumbItem>
<BreadcrumbLink as={NextLink} href={INDEX_ROUTE}>
<BreadcrumbLink
as={NextLink}
href={navV2 ? PRIVACY_REQUESTS_ROUTE : INDEX_ROUTE}
>
Privacy Requests
</BreadcrumbLink>
</BreadcrumbItem>
Expand Down