8000 fix: Hide search in public context by zatteo · Pull Request #880 · cozy/cozy-bar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Hide search in public context #880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/Bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const Bar = ({
}) => {
const client = useClient()
const { isMobile } = useBreakpoints()
const isSearchEnabled = searchOptions.enabled && !isPublic

const fetchInitialData = useCallback(() => {
if (!isPublic) {
Expand Down Expand Up @@ -120,7 +121,7 @@ export const Bar = ({
}

const renderSearch = () => {
return searchOptions.enabled && !isMobile ? (
return isSearchEnabled && !isMobile ? (
<div className="u-flex-grow u-mh-2">
<AssistantDesktop
componentsProps={{ SearchBarDesktop: { size: 'small' } }}
Expand All @@ -140,7 +141,7 @@ export const Bar = ({
{barLeft || renderLeft()}
{barCenter || renderCenter()}
<div className="u-flex-grow">{barSearch || renderSearch()}</div>
{searchOptions.enabled && isMobile ? <SearchButton /> : null}
{isSearchEnabled && isMobile ? <SearchButton /> : null}
{barRight}
{!isPublic && renderTwakeRight()}
</div>
Expand Down
Loading
0