diff --git a/packages/frontend/src/components/top-bar.tsx b/packages/frontend/src/components/top-bar.tsx index 380752a..1e8fa26 100644 --- a/packages/frontend/src/components/top-bar.tsx +++ b/packages/frontend/src/components/top-bar.tsx @@ -2,6 +2,7 @@ import { useMemo } from "react"; import { useLocation, useNavigate } from "react-router-dom"; import Account from "@/components/account"; import { IssueForm } from "@/components/issue-form"; +import { SprintForm } from "@/components/sprint-form"; import LogOutButton from "@/components/log-out-button"; import OrgIcon from "@/components/org-icon"; import { OrganisationSelect } from "@/components/organisation-select"; @@ -23,12 +24,13 @@ import Icon from "@/components/ui/icon"; import { IconButton } from "@/components/ui/icon-button"; import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { BREATHING_ROOM } from "@/lib/layout"; -import { useOrganisations } from "@/lib/query/hooks"; +import { useOrganisations, useSprints } from "@/lib/query/hooks"; export default function TopBar({ showIssueForm = true }: { showIssueForm?: boolean }) { const { user } = useAuthenticatedSession(); const { selectedOrganisationId, selectedProjectId, selectIssue } = useSelection(); const { data: organisationsData = [] } = useOrganisations(); + const { data: sprintsData = [] } = useSprints(selectedProjectId); const location = useLocation(); const navigate = useNavigate(); const activeView = location.pathname.startsWith("/timeline") ? "timeline" : "issues"; @@ -85,7 +87,7 @@ export default function TopBar({ showIssueForm = true }: { showIssueForm?: boole )} - {selectedOrganisationId && selectedProjectId && showIssueForm && ( + {selectedOrganisationId && selectedProjectId && showIssueForm && activeView === "issues" && ( )} + {selectedOrganisationId && selectedProjectId && showIssueForm && activeView === "timeline" && ( + + + + } + /> + )} diff --git a/packages/frontend/src/pages/Timeline.tsx b/packages/frontend/src/pages/Timeline.tsx index 5a049bd..61c0f1f 100644 --- a/packages/frontend/src/pages/Timeline.tsx +++ b/packages/frontend/src/pages/Timeline.tsx @@ -286,9 +286,9 @@ export default function Timeline() { > {sprint.name} - - - {getSprintDateRange(sprint)} + + {getSprintDateRange(sprint)} + {sprintIssues.length === 0 && ( No issues assigned. @@ -348,7 +348,7 @@ export default function Timeline() {