Skip to content

Commit 669e284

Browse files
mamoodiamanape
andauthored
Only show start project button in conversations (#6626)
Co-authored-by: sp.wack <[email protected]>
1 parent 8140d2e commit 669e284

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

frontend/src/components/shared/buttons/exit-project-button.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useTranslation } from "react-i18next";
2+
import { useLocation } from "react-router";
23
import { I18nKey } from "#/i18n/declaration";
34
import NewProjectIcon from "#/icons/new-project.svg?react";
45
import { TooltipButton } from "./tooltip-button";
@@ -9,7 +10,12 @@ interface ExitProjectButtonProps {
910

1011
export function ExitProjectButton({ onClick }: ExitProjectButtonProps) {
1112
const { t } = useTranslation();
13+
const location = useLocation();
1214
const startNewProject = t(I18nKey.PROJECT$START_NEW);
15+
16+
// Only show the button in the conversations page
17+
if (!location.pathname.startsWith("/conversations")) return null;
18+
1319
return (
1420
<TooltipButton
1521
tooltip={startNewProject}

0 commit comments

Comments
 (0)