Skip to content

Commit

Permalink
[#560] fix cityname
Browse files Browse the repository at this point in the history
  • Loading branch information
m-vuk committed Sep 15, 2024
1 parent 270d436 commit df528ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/app/(dashboard)/[city]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default async function DashboardLayout({
return (
<Container>
<Header />
<BreadCrumb logo={city.local_group?.logo}></BreadCrumb>
<BreadCrumb logo={city.local_group?.logo} cityName={city.name}></BreadCrumb>
{children}
<Footer />
</Container>
Expand Down
1 change: 0 additions & 1 deletion frontend/app/(dashboard)/[city]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import LocalGroup from "@/app/components/LocalGroup";
import NavigationTile from "@/app/components/NavigationTile";
import styles from "./page.module.scss";
import { getCities, getTasks, getRecursiveStatusNumbers } from "@/lib/dataService";
import indicator2 from "@/public/imgs/placeholders/indicator2.png";
import ImplementationIndicator from "@/app/components/ImplementationIndicator";
import ChecklistIndicator from "@/app/components/ChecklistIndicator";
import { ChecklistItem } from "@/types";
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/components/BreadCrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import Image from "next/image";

type TBreadCrumbProps = {
logo: string
cityName: string
}

const Breadcrumb = ({ logo }: TBreadCrumbProps) => {
const Breadcrumb = ({ logo, cityName }: TBreadCrumbProps) => {

const paths = usePathname()
const pathNames = paths.split('/').filter(path => path);

const citySlug = pathNames[0] ?? "";
const cityName = citySlug[0]?.toUpperCase() + citySlug?.slice(1)
const listClasses = "item";
const activeClasses = "fw-bold";
const labelMapping: { [key: string]: string } = {
Expand Down

0 comments on commit df528ab

Please sign in to comment.