Skip to content

Commit

Permalink
Include agency id in link to category overview (#1311)
Browse files Browse the repository at this point in the history
Co-authored-by: Mahmoud <mahmoud@Mahmouds-MacBook-Pro.local>
  • Loading branch information
mxosman and Mahmoud committed Apr 24, 2024
1 parent 61055cc commit 508c241
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions agency-dashboard/src/AgencyOverview/AgencyOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const AgencyOverview = observer(() => {
const { slug } = useParams();
const { agencyDataStore } = useStore();
const {
agency,
agencyName,
agencyDescription,
agencyHomepageUrl,
Expand All @@ -91,8 +92,8 @@ export const AgencyOverview = observer(() => {
category: string,
currSystem: string | undefined
) => {
if (isClickable) {
navigate(`/agency/${slug}/${slugify(category)}`, {
if (isClickable && agency?.id) {
navigate(`/agency/${agency.id}/${slug}/${slugify(category)}`, {
state: { currentSystem: currSystem },
});
}
Expand Down

0 comments on commit 508c241

Please sign in to comment.