Hotfix for history post

This commit is contained in:
Sean Edmunds
2025-02-20 16:36:03 -06:00
parent f5f0dcf566
commit b017e02747

View File

@@ -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');
});
}
}
};