Skip to content

Commit

Permalink
fix: show archive tooltip only on project screen (#8685)
Browse files Browse the repository at this point in the history
Fixing archive tooltip appearing on every filter in Unleash


![image](https://github.com/user-attachments/assets/5fc4ff0b-ddd7-4101-ac6b-141ea4b67c78)
  • Loading branch information
sjaanus authored Nov 7, 2024
1 parent cfe19de commit ba79a63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/component/filter/AddFilterButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useUiFlag } from 'hooks/useUiFlag';
import { HtmlTooltip } from 'component/common/HtmlTooltip/HtmlTooltip';
import useSplashApi from 'hooks/api/actions/useSplashApi/useSplashApi';
import { useAuthSplash } from 'hooks/api/getters/useAuth/useAuthSplash';
import { useOptionalPathParam } from 'hooks/useOptionalPathParam';

const StyledButton = styled(Button)(({ theme }) => ({
padding: theme.spacing(0, 1.25, 0, 1.25),
Expand Down Expand Up @@ -46,6 +47,7 @@ export const AddFilterButton = ({
setHiddenOptions,
availableFilters,
}: IAddFilterButtonProps) => {
const projectId = useOptionalPathParam('projectId');
const simplifyProjectOverview = useUiFlag('simplifyProjectOverview');
const { setSplashSeen } = useSplashApi();
const { splash } = useAuthSplash();
Expand Down Expand Up @@ -95,7 +97,7 @@ export const AddFilterButton = ({
};
return (
<div>
{simplifyProjectOverview ? (
{simplifyProjectOverview && projectId ? (
<HtmlTooltip
placement='right'
arrow
Expand Down

0 comments on commit ba79a63

Please sign in to comment.