Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
fix(search): hide content when `disableUserPersonalization
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Jul 20, 2020
1 parent de31121 commit 4940538
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/docsearch-react/src/StartScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ interface StartScreenProps

export function StartScreen(props: StartScreenProps) {
if (props.state.status === 'idle' && props.hasSuggestions === false) {
if (props.disableUserPersonalization) {
return null;
}

return (
<div className="DocSearch-StartScreen">
{!props.disableUserPersonalization && (
<p className="DocSearch-Help">No recent searches</p>
)}
<p className="DocSearch-Help">No recent searches</p>
</div>
);
}
Expand Down

0 comments on commit 4940538

Please sign in to comment.