Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
seungpark committed Nov 22, 2024
1 parent fc3c8e8 commit db712e0
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/components/ActionBar/ActionBar.js
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { cx } from '@leafygreen-ui/emotion';
import Icon from '@leafygreen-ui/icon';
import { Overline } from '@leafygreen-ui/typography';
import { useDarkMode } from '@leafygreen-ui/leafygreen-provider';
import { useSiteMetadata } from '../../hooks/use-site-metadata';
import { isBrowser } from '../../utils/is-browser';
import { getPlaintext } from '../../utils/get-plaintext';
@@ -37,6 +38,7 @@ export const DEPRECATED_PROJECTS = ['atlas-app-services', 'datalake', 'realm'];
const ActionBar = ({ template, slug, sidenav, ...props }) => {
const url = isBrowser ? window.location.href : null;
const metadata = useSnootyMetadata();
const { darkMode } = useDarkMode();
const { snootyEnv } = useSiteMetadata();
const feedbackData = useFeedbackData({
slug,
@@ -71,8 +73,8 @@ const ActionBar = ({ template, slug, sidenav, ...props }) => {
<ActionsBox>
{template !== 'openapi' && <DarkModeDropdown />}
<SuspenseHelper>
<Chatbot serverBaseUrl={CHATBOT_SERVER_BASE_URL}>
<ChatbotButton></ChatbotButton>
<Chatbot serverBaseUrl={CHATBOT_SERVER_BASE_URL} darkMode={darkMode}>
<ChatbotButton />
</Chatbot>
</SuspenseHelper>

4 changes: 0 additions & 4 deletions src/components/ActionBar/SearchInput.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@ import { useLocation } from '@gatsbyjs/reach-router';
import { css, cx } from '@leafygreen-ui/emotion';
import IconButton from '@leafygreen-ui/icon-button';
import Icon from '@leafygreen-ui/icon';
// import { useDarkMode } from '@leafygreen-ui/leafygreen-provider';
import { SearchInput as LGSearchInput } from '@leafygreen-ui/search-input';
import { Link } from '@leafygreen-ui/typography';
import { useAllDocsets } from '../../hooks/useAllDocsets';
@@ -19,9 +18,6 @@ import { reportAnalytics } from '../../utils/report-analytics';
import { searchIconStyling, searchInputStyling, StyledInputContainer, StyledSearchBoxRef } from './styles';
import { ShortcutIcon, SparkleIcon } from './SparkIcon';

// const Chatbot = lazy(() => import('mongodb-chatbot-ui'));
// const SearchMenu = lazy(() => import('./SearchMenu'));

export const PLACEHOLDER_TEXT = `Search MongoDB Docs`;
const PLACEHOLDER_TEXT_MOBILE = 'Search';

0 comments on commit db712e0

Please sign in to comment.