Skip to content

Commit

Permalink
chore(demo): hide search button if algolia is not available (#9579)
Browse files Browse the repository at this point in the history
Co-authored-by: taiga-family-bot <[email protected]>
  • Loading branch information
vladimirpotekhin and taiga-family-bot authored Oct 24, 2024
1 parent f2eb6ff commit 7734956
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions projects/demo/src/modules/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {DemoRoute} from '@demo/routes';
import {TuiDemo} from '@demo/utils';
import {WA_LOCAL_STORAGE} from '@ng-web-apis/common';
import {ResizeObserverService} from '@ng-web-apis/resize-observer';
import {TUI_DOC_SEARCH_ENABLED} from '@taiga-ui/addon-doc';
import {TuiButton, TuiDataList, TuiDropdown, TuiIcon} from '@taiga-ui/core';
import {TuiBadgedContent} from '@taiga-ui/kit';
import {TuiSheetModule, TuiTextfieldControllerModule} from '@taiga-ui/legacy';
Expand Down Expand Up @@ -76,6 +77,7 @@ export class App extends AbstractDemo implements OnInit {
protected readonly storage = inject(WA_LOCAL_STORAGE);
protected readonly routes = DemoRoute;
protected readonly stars = signal('');
protected readonly defaultSearchEnabled = inject(TUI_DOC_SEARCH_ENABLED);

protected readonly isLanding = toSignal(
this.router.events.pipe(
Expand Down
2 changes: 1 addition & 1 deletion projects/demo/src/modules/app/app.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<version-manager />

<tui-algolia-search />
<tui-algolia-search *ngIf="!defaultSearchEnabled()" />

<button
appearance="outline-grayscale"
Expand Down

0 comments on commit 7734956

Please sign in to comment.