diff --git a/api-server/src/common/models/user.js b/api-server/src/common/models/user.js index a2632bae42..90ce86ab13 100644 --- a/api-server/src/common/models/user.js +++ b/api-server/src/common/models/user.js @@ -26,7 +26,7 @@ import { renderSignInEmail } from '../utils'; -import { blocklistedUsernames } from '../../server/utils/constants.js'; +import { blocklistedUsernames } from '../../../../config/constants'; import { wrapHandledError } from '../../server/utils/create-handled-error.js'; import { saveUser, observeMethod } from '../../server/utils/rx.js'; import { getEmailSender } from '../../server/utils/url-utils'; diff --git a/client/i18n/locales/english/translations.json b/client/i18n/locales/english/translations.json index b8e2d94f37..bddad18243 100644 --- a/client/i18n/locales/english/translations.json +++ b/client/i18n/locales/english/translations.json @@ -395,7 +395,8 @@ "analytics": "A bar chart and line graph", "shield": "A shield with a checkmark", "tensorflow": "Tensorflow icon", - "algorithm": "Branching nodes" + "algorithm": "Branching nodes", + "magnifier": "magnifier" }, "aria": { "fcc-logo": "freeCodeCamp Logo", diff --git a/client/src/assets/icons/Magnifier.tsx b/client/src/assets/icons/Magnifier.tsx new file mode 100644 index 0000000000..42e5a13c1e --- /dev/null +++ b/client/src/assets/icons/Magnifier.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import { useTranslation } from 'react-i18next'; + +const Magnifier = (): JSX.Element => { + const { t } = useTranslation(); + + return ( + <> + {t('icons.Magnifier')} + + + + + ); +}; + +Magnifier.displayName = 'Magnifier'; +export default Magnifier; diff --git a/client/src/components/Header/components/UniversalNav.js b/client/src/components/Header/components/UniversalNav.js index 47f5c86bbe..4cfb9e58c1 100644 --- a/client/src/components/Header/components/UniversalNav.js +++ b/client/src/components/Header/components/UniversalNav.js @@ -3,10 +3,17 @@ import PropTypes from 'prop-types'; import { Link, SkeletonSprite } from '../../helpers'; import NavLogo from './NavLogo'; -import SearchBar from '../../search/searchBar/SearchBar'; import MenuButton from './MenuButton'; import NavLinks from './NavLinks'; import './universalNav.css'; +import { isLanding } from '../../../utils/path-parsers'; + +import Loadable from '@loadable/component'; + +const SearchBar = Loadable(() => import('../../search/searchBar/SearchBar')); +const SearchBarOptimized = Loadable(() => + import('../../search/searchBar/search-bar-optimized') +); export const UniversalNav = ({ displayMenu, @@ -17,6 +24,14 @@ export const UniversalNav = ({ fetchState }) => { const { pending } = fetchState; + + const search = + typeof window !== `undefined` && isLanding(window.location.pathname) ? ( + + ) : ( + + ); + return (