1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-03-09 00:18:26 +01:00

fix: show archive tooltip only on project screen (#8685)

Fixing archive tooltip appearing on every filter in Unleash


![image](https://github.com/user-attachments/assets/5fc4ff0b-ddd7-4101-ac6b-141ea4b67c78)
This commit is contained in:
Jaanus Sellin 2024-11-07 10:49:31 +02:00 committed by GitHub
parent cfe19dee73
commit ba79a633e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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),
@ -46,6 +47,7 @@ export const AddFilterButton = ({
setHiddenOptions,
availableFilters,
}: IAddFilterButtonProps) => {
const projectId = useOptionalPathParam('projectId');
const simplifyProjectOverview = useUiFlag('simplifyProjectOverview');
const { setSplashSeen } = useSplashApi();
const { splash } = useAuthSplash();
@ -95,7 +97,7 @@ export const AddFilterButton = ({
};
return (
<div>
{simplifyProjectOverview ? (
{simplifyProjectOverview && projectId ? (
<HtmlTooltip
placement='right'
arrow