Skip to content

Commit

Permalink
chore(demo): hide search button if algolia is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirpotekhin committed Oct 22, 2024
1 parent 22b4051 commit 654f94d
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 @@ -28,6 +28,7 @@ import {YaMetrikaService} from './metrika/metrika.service';
import {TuiAlgoliaSearch} from './search';
import {VersionManager} from './version-manager/version-manager.component';
import {TUI_VERSION_MANAGER_PROVIDERS} from './version-manager/version-manager.providers';
import {TUI_DOC_SEARCH_ENABLED} from '@taiga-ui/addon-doc';

@Component({
standalone: true,
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 654f94d

Please sign in to comment.