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

Commit 4940538

Browse files
fix(search): hide content when `disableUserPersonalization
1 parent de31121 commit 4940538

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/docsearch-react/src/StartScreen.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ interface StartScreenProps
2626

2727
export function StartScreen(props: StartScreenProps) {
2828
if (props.state.status === 'idle' && props.hasSuggestions === false) {
29+
if (props.disableUserPersonalization) {
30+
return null;
31+
}
32+
2933
return (
3034
<div className="DocSearch-StartScreen">
31-
{!props.disableUserPersonalization && (
32-
<p className="DocSearch-Help">No recent searches</p>
33-
)}
35+
<p className="DocSearch-Help">No recent searches</p>
3436
</div>
3537
);
3638
}

0 commit comments

Comments
 (0)