Skip to content

Commit

Permalink
[Gitar] Updating TSX files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitar committed Nov 19, 2024
1 parent fc1a8e9 commit e5e4464
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { useStickinessOptions } from 'hooks/useStickinessOptions';
import { ChangeRequestTableConfigButton } from './ConfigButtons/ChangeRequestTableConfigButton';
import { StyledDefinitionList } from './CreateProjectDialog.styles';
import { ProjectIcon } from 'component/common/ProjectIcon/ProjectIcon';
import { useUiFlag } from '../../../../../hooks/useUiFlag';

interface ICreateProjectDialogProps {
open: boolean;
Expand Down Expand Up @@ -119,7 +118,6 @@ export const CreateProjectDialog = ({
const { setToastData, setToastApiError } = useToast();
const navigate = useNavigate();
const { trackEvent } = usePlausibleTracker();
const onboardingUIEnabled = useUiFlag('onboardingUI');
const {
projectName,
projectDesc,
Expand Down Expand Up @@ -192,11 +190,9 @@ export const CreateProjectDialog = ({
trackEvent('project-mode', {
props: { mode: projectMode, action: 'added' },
});
if (onboardingUIEnabled) {
trackEvent('onboarding', {
props: { eventType: 'onboarding-started' },
});
}
trackEvent('onboarding', {
props: { eventType: 'onboarding-started' },
});
} catch (error: unknown) {
setToastApiError(formatUnknownError(error));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const setupApi = () => {
testServerRoute(server, '/api/admin/ui-config', {
flags: {
flagCreator: true,
onboardingUI: true,
},
});
testServerRoute(server, '/api/admin/tags', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export const ProjectFeatureToggles = ({
environments,
}: IPaginatedProjectFeatureTogglesProps) => {
const { trackEvent } = usePlausibleTracker();
const onboardingUIEnabled = useUiFlag('onboardingUI');
const projectId = useRequiredPathParam('projectId');
const { project } = useProjectOverview(projectId);
const [connectSdkOpen, setConnectSdkOpen] = useState(false);
Expand Down Expand Up @@ -152,12 +151,9 @@ export const ProjectFeatureToggles = ({
>(`onboarding-state:v1-${projectId}`, 'hide-setup');

const notOnboarding =
!onboardingUIEnabled ||
(onboardingUIEnabled &&
project.onboardingStatus.status === 'onboarded') ||
project.onboardingStatus.status === 'onboarded' ||
onboardingFlow === 'closed';
const isOnboarding =
onboardingUIEnabled &&
project.onboardingStatus.status !== 'onboarded' &&
onboardingFlow === 'visible';
const noFeaturesExistInProject = project.featureTypeCounts?.length === 0;
Expand Down

0 comments on commit e5e4464

Please sign in to comment.