Skip to content

Commit

Permalink
added dynamic board name from url
Browse files Browse the repository at this point in the history
  • Loading branch information
Voland91 committed Mar 1, 2022
1 parent 447b526 commit 52b952a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/views/Board/Board.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
import { useState } from "react";
import { useParams } from "react-router-dom";
import PageHeader from "../../modules/PageHeader/PageHeader";
import ThreeDotsMenu from "../../components/ThreeDotsMenu/ThreeDotsMenu";
import { TaskWrapper } from "./Board.style";
Expand All @@ -17,6 +18,7 @@ export const Board = () => {
const { t } = useTranslation();
const [boardNumberAlert, setBoardNumberAlert] = useState(false);
const [boardNameAlert, setBoardNameAlert] = useState(false);
const { name } = useParams();

const menuOptions = [
{
Expand Down Expand Up @@ -46,7 +48,7 @@ export const Board = () => {
return (
<StyledPageWrapper>
<PageHeader
pageTitle={t("boardsTitle")}
pageTitle={`${t("boardsTitle")} ${name}`}
buttonText={t("newIssueBtn")}
buttonHandler={() => console.log("button clicked")}
menuComponent={<ThreeDotsMenu menuItems={menuOptions} />}
Expand Down

0 comments on commit 52b952a

Please sign in to comment.