Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
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
11 changes: 8 additions & 3 deletions scripts/__snapshots__/e2e-templates.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ exports[`Templates Angular InstantSearch File content: src/app/app.component.ts
"import { Component } from '@angular/core';
import * as algoliasearch from 'algoliasearch';

const searchClient = algoliasearch(
'appId',
'apiKey'
);

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
Expand All @@ -394,7 +399,7 @@ import * as algoliasearch from 'algoliasearch';
export class AppComponent {
config = {
indexName: 'indexName',
searchClient: algoliasearch('appId', 'apiKey'),
searchClient,
};
}"
`;
Expand Down Expand Up @@ -3780,8 +3785,8 @@ import PropTypes from 'prop-types';
import './App.css';

const searchClient = algoliasearch(
'appId',
'apiKey'
'appId',
'apiKey'
);

class App extends Component {
Expand Down
7 changes: 6 additions & 1 deletion src/templates/Angular InstantSearch/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { Component } from '@angular/core';
import * as algoliasearch from 'algoliasearch';

const searchClient = algoliasearch(
'{{appId}}',
'{{apiKey}}'
);

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
Expand All @@ -9,6 +14,6 @@ import * as algoliasearch from 'algoliasearch';
export class AppComponent {
config = {
indexName: '{{indexName}}',
searchClient: algoliasearch('{{appId}}', '{{apiKey}}'),
searchClient,
};
}
4 changes: 2 additions & 2 deletions src/templates/React InstantSearch/src/App.js.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import PropTypes from 'prop-types';
import './App.css';

const searchClient = algoliasearch(
'{{appId}}',
'{{apiKey}}'
'{{appId}}',
'{{apiKey}}'
);

class App extends Component {
Expand Down