@codecademy/brand 3.14.0-alpha.42cb58f763.0 → 3.14.0-alpha.5e1cc2d467.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,15 +3,11 @@ import { useTheme } from '@emotion/react';
3
3
  import * as React from 'react';
4
4
  import { useCallback, useMemo } from 'react';
5
5
  import { AppHeader, AppHeaderMobile, isAppHeaderItemWithHref } from '..';
6
- import { GlobalHeaderDynamicDataContext, GlobalHeaderItemClickContext } from './context';
6
+ import { DropdownPositions, GlobalHeaderDynamicDataContext, GlobalHeaderItemClickContext, HeaderDisplayContext } from './context';
7
7
  import { anonDefaultHeaderItems, anonDefaultMobileHeaderItems, anonLandingHeaderItems, anonLandingMobileHeaderItems, anonLoginHeaderItems, anonLoginMobileHeaderItems, anonSignupHeaderItems, anonSignupMobileHeaderItems, enterpriseHeaderItems, enterpriseMobileHeaderItems, freeHeaderItems, freeMobileHeaderItems, loadingHeaderItems, loadingMobileHeaderItems, proHeaderItems, proMobileHeaderItems, simpleBootcampHeaderItems, simpleBootcampMobileHeaderItems, simpleHeaderItems, simpleMobileHeaderItems, teamsHeaderItems, teamsMobileHeaderItems } from './GlobalHeaderVariants';
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  export * from './types';
10
10
  export const LiveLearningHubContext = /*#__PURE__*/React.createContext(false);
11
- export const HeaderQuizContext = /*#__PURE__*/React.createContext({
12
- showOnboardingQuiz: false,
13
- showSortingQuiz: false
14
- });
15
11
  export const GlobalNavRedesignContext = /*#__PURE__*/React.createContext(false);
16
12
  export const BlpHeroExperimentContext = /*#__PURE__*/React.createContext(false);
17
13
 
@@ -67,10 +63,14 @@ export const GlobalHeader = props => {
67
63
  const hideNotification = props.type === 'loading' || props.type === 'enterprise' || props.type === 'simple' || props.type === 'bootcamp';
68
64
  const showOnboardingQuiz = props.type === 'anon' || (props.type === 'free' || props.type === 'pro') && !props.user.enrolledInTwoOrMoreContainers;
69
65
  const showSortingQuiz = (props.type === 'free' || props.type === 'pro') && props.user.enrolledInTwoOrMoreContainers;
70
- return /*#__PURE__*/_jsx(HeaderQuizContext.Provider, {
66
+ return /*#__PURE__*/_jsx(HeaderDisplayContext.Provider, {
71
67
  value: {
72
68
  showOnboardingQuiz,
73
- showSortingQuiz
69
+ showSortingQuiz,
70
+ headerType: useMemo(() => {
71
+ if (props.type in DropdownPositions) return props.type;
72
+ return 'default';
73
+ }, [props.type])
74
74
  },
75
75
  children: /*#__PURE__*/_jsx(GlobalNavRedesignContext.Provider, {
76
76
  value: !!props.displayGlobalNavRedesign,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/brand",
3
3
  "description": "Brand component library for Codecademy",
4
- "version": "3.14.0-alpha.42cb58f763.0",
4
+ "version": "3.14.0-alpha.5e1cc2d467.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@emotion/is-prop-valid": "^1.2.1",