Skip to content

Commit

Permalink
remove onboarding and referral screens (#1157)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks19 authored Jul 11, 2024
1 parent 1486b53 commit 9cbadbb
Show file tree
Hide file tree
Showing 18 changed files with 4 additions and 774 deletions.
6 changes: 0 additions & 6 deletions packages/web-app/src/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { Location } from 'history'
import type { RouteComponentProps } from 'react-router'
import { Redirect, Route, Switch, withRouter } from 'react-router'
import { NoPageFound } from './components'
import { ReferralOnboardingContainer, ReferralWelcomeContainer } from './modules/account-views/referral-views'
import { ReplaceBonusModalContainer } from './modules/bonus-views'
import { EarnInfoPage, EarningSummaryContainer } from './modules/earn-views'
import { ExitSurveyContainer } from './modules/exit-survey-views'
Expand All @@ -22,11 +21,6 @@ const _Routes = ({ location, isAuthenticated }: Props) => {

return (
<Switch location={currentLocation}>
{/* Onboarding */}
<Route exact path="/onboarding/referral" component={ReferralOnboardingContainer} />
<Route exact path="/onboarding/welcome" component={ReferralWelcomeContainer} />
<Redirect exact from="/welcome" to="/onboarding/welcome" />

{/* Store Pages */}
<Route path={['/store', '/store/search']} exact render={() => <StorefrontHomePage />} />
<Route path="/store/rewards/:id" exact component={RewardDetailsContainer} />
Expand Down
6 changes: 0 additions & 6 deletions packages/web-app/src/Store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { ErrorBoundaryStore } from './modules/error-boundary'
import { HelpScoutStore } from './modules/helpscout/HelpScoutStore'
import { HomeStore } from './modules/home/HomeStore'
import { NotificationStore } from './modules/notifications'
import { OnboardingStore } from './modules/onboarding'
import { ProfileStore } from './modules/profile'
import type { Profile } from './modules/profile/models'
import { ReferralStore } from './modules/referral'
Expand Down Expand Up @@ -67,7 +66,6 @@ export class RootStore {
public readonly storefront: StorefrontStore
public readonly bonuses: BonusStore
public readonly achievements: AchievementsStore
public readonly onboarding: OnboardingStore
public readonly startButtonUI: StartButtonUIStore
public readonly saladCard: SaladCardStore
public readonly errorBoundary: ErrorBoundaryStore
Expand All @@ -94,7 +92,6 @@ export class RootStore {
this.helpScout = new HelpScoutStore(axios, this.auth)
this.storefront = new StorefrontStore(axios)
this.bonuses = new BonusStore(this, axios)
this.onboarding = new OnboardingStore(this)
this.startButtonUI = new StartButtonUIStore(this)
this.errorBoundary = new ErrorBoundaryStore()

Expand Down Expand Up @@ -165,16 +162,13 @@ export class RootStore {
}

this.finishInitialLoading()
this.onboarding.showOnboardingIfNeeded()
this.onboarding.reshowOnboardingPagesIfNeeded()
}.bind(this),
)

@action
onLogout = (): void => {
this.referral.currentReferral = undefined
this.referral.referralCode = ''
this.onboarding.resetAccountOnboardingPagesCompleted()

this.analytics.trackLogout()
this.helpScout.logout()
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion packages/web-app/src/modules/account-views/index.tsx

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,33 +1,9 @@
import classnames from 'classnames'
import type { WithStyles } from 'react-jss'
import withStyles from 'react-jss'
import { ReferralCodeEntryContainer } from '../..'
import { P, SectionHeader } from '../../../../components'
import type { Referral } from '../../../referral/models'
import { CurrentReferralProgress } from './CurrentReferralProgress'

const styles = {
container: {
userSelect: 'none',
paddingBottom: '1rem',
},
}

interface Props extends WithStyles<typeof styles> {
interface Props {
referral?: Referral
}

const _CurrentReferralPanel = ({ classes, referral }: Props) => (
<>
{referral?.referralDefinition && <CurrentReferralProgress referral={referral} />}
{!referral && (
<div className={classnames(classes.container)}>
<SectionHeader>Enter A Code</SectionHeader>
<P>Received a referral code? Enter it below so you can earn your referral bonus!</P>
<ReferralCodeEntryContainer />
</div>
)}
</>
)

export const CurrentReferralPanel = withStyles(styles)(_CurrentReferralPanel)
export const CurrentReferralPanel = ({ referral }: Props) =>
referral?.referralDefinition && <CurrentReferralProgress referral={referral} />

This file was deleted.

Loading

0 comments on commit 9cbadbb

Please sign in to comment.