Hotfix for history post
This commit is contained in:
@@ -61,7 +61,6 @@ export default function Search({
|
||||
const handleKeyPress = (item: any) => {
|
||||
let option = '';
|
||||
let subtext = '';
|
||||
|
||||
if (item.target.value.startsWith('/')) {
|
||||
option =
|
||||
item.target.value.substr(1, item.target.value.indexOf(' ') - 1) ||
|
||||
@@ -82,8 +81,9 @@ export default function Search({
|
||||
method: 'POST',
|
||||
endpoint: 'api/searchHistory',
|
||||
body: { prefix: providerPrefix, provider: providerLabel, searchTerm: subtext },
|
||||
});
|
||||
}).then(() => {
|
||||
open(`${providerURL}${subtext}`, '_self');
|
||||
});
|
||||
} else if (providerLabel === 'Show weather') {
|
||||
openWeatherModal();
|
||||
} else if (providerLabel.startsWith('Launch')) {
|
||||
@@ -100,8 +100,9 @@ export default function Search({
|
||||
method: 'POST',
|
||||
endpoint: 'api/searchHistory',
|
||||
body: { prefix: providerPrefix, provider: providerLabel, searchTerm: subtext },
|
||||
});
|
||||
}).then(() => {
|
||||
open(`${providerURL}${subtext}`, '_self');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user