Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{
name: "Title",
value: "title",
direction: "asc"
}
];
let connector;
if (process.env.REACT_APP_SOURCE === "SITE_SEARCH") {
connector = new SiteSearchAPIConnector({
engineKey:
process.env.REACT_SITE_SEARCH_ENGINE_KEY || "Z43R5U3HiDsDgpKawZkA",
documentType: process.env.REACT_SITE_SEARCH_ENGINE_NAME || "national-parks"
});
} else {
connector = new AppSearchAPIConnector({
searchKey:
process.env.REACT_APP_SEARCH_KEY || "search-371auk61r2bwqtdzocdgutmg",
engineName:
process.env.REACT_APP_SEARCH_ENGINE_NAME || "search-ui-examples",
hostIdentifier:
process.env.REACT_APP_SEARCH_HOST_IDENTIFIER || "host-2376rb",
endpointBase: process.env.REACT_APP_SEARCH_ENDPOINT_BASE || ""
});
}
const config = {
alwaysSearchOnInitialLoad: true,
searchQuery: {
result_fields: {
visitors: { raw: {} },
world_heritage_site: { raw: {} },