File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
frontend/src/components/shared/buttons Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { useTranslation } from "react-i18next" ;
2
+ import { useLocation } from "react-router" ;
2
3
import { I18nKey } from "#/i18n/declaration" ;
3
4
import NewProjectIcon from "#/icons/new-project.svg?react" ;
4
5
import { TooltipButton } from "./tooltip-button" ;
@@ -9,7 +10,12 @@ interface ExitProjectButtonProps {
9
10
10
11
export function ExitProjectButton ( { onClick } : ExitProjectButtonProps ) {
11
12
const { t } = useTranslation ( ) ;
13
+ const location = useLocation ( ) ;
12
14
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
+
13
19
return (
14
20
< TooltipButton
15
21
tooltip = { startNewProject }
You can’t perform that action at this time.
0 commit comments