Skip to content

Commit

Permalink
chore: onboarding extension pwa
Browse files Browse the repository at this point in the history
  • Loading branch information
sshanzel committed Feb 13, 2025
1 parent d17e0e3 commit 7adef7d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
4 changes: 0 additions & 4 deletions packages/shared/src/lib/featureManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ export const featureOnboardingPlusCheckout = new Feature(

export const featureAutorotateAds = new Feature('autorotate_ads', 0);

export const featureOnboardingExtension = new Feature(
'onboarding_extension',
false,
);
export const featureOnboardingDesktopPWA = new Feature(
'onboarding_desktop_pwa',
false,
Expand Down
15 changes: 1 addition & 14 deletions packages/webapp/pages/onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@ import {
} from '@dailydotdev/shared/src/components/Pixels';
import {
feature,
featureOnboardingExtension,
featureOnboardingDesktopPWA,
featureAndroidPWA,
featureOnboardingPlusCheckout,
} from '@dailydotdev/shared/src/lib/featureManagement';
import { OnboardingHeadline } from '@dailydotdev/shared/src/components/auth';
import {
useActions,
useConditionalFeature,
useViewSize,
ViewSize,
} from '@dailydotdev/shared/src/hooks';
Expand Down Expand Up @@ -208,13 +206,7 @@ export function OnboardPage(): ReactElement {
const targetId: string = ExperimentWinner.OnboardingV4;
const formRef = useRef<HTMLFormElement>();
const [activeScreen, setActiveScreen] = useState(OnboardingStep.Intro);
const [shouldEnrollOnboardingStep, setShouldEnrollOnboardingStep] =
useState(false);
const { shouldShowExtensionOnboarding } = useOnboardingExtension();
const { value: extensionExperiment } = useConditionalFeature({
feature: featureOnboardingExtension,
shouldEvaluate: shouldEnrollOnboardingStep && shouldShowExtensionOnboarding,
});
const [isPlusCheckout, setIsPlusCheckout] = useState(false);

const hasSelectTopics = !!feedSettings?.includeTags?.length;
Expand Down Expand Up @@ -297,7 +289,6 @@ export function OnboardPage(): ReactElement {

if (activeScreen === OnboardingStep.EditTag) {
completeStep(ActionType.EditTag);
setShouldEnrollOnboardingStep(true);
return setActiveScreen(OnboardingStep.ContentTypes);
}

Expand Down Expand Up @@ -343,11 +334,7 @@ export function OnboardPage(): ReactElement {
OnboardingStep.InstallDesktop,
].includes(activeScreen);

if (
extensionExperiment &&
shouldShowExtensionOnboarding &&
isNotExtensionRelatedStep
) {
if (shouldShowExtensionOnboarding && isNotExtensionRelatedStep) {
return setActiveScreen(OnboardingStep.Extension);
}

Expand Down

0 comments on commit 7adef7d

Please sign in to comment.