mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 06:08:48 +00:00
lint support custom search provider in quicklaunch
This commit is contained in:
parent
ad299e9c94
commit
046f2986a8
1 changed files with 5 additions and 7 deletions
|
@ -200,8 +200,7 @@ function Home({ initialSettings }) {
|
||||||
if (Array.isArray(searchWidget.options?.provider)) {
|
if (Array.isArray(searchWidget.options?.provider)) {
|
||||||
// if search provider is a list, try to retrieve from localstorage, fall back to the first
|
// if search provider is a list, try to retrieve from localstorage, fall back to the first
|
||||||
searchProvider = getStoredProvider() ?? searchProviders[searchWidget.options.provider[0]];
|
searchProvider = getStoredProvider() ?? searchProviders[searchWidget.options.provider[0]];
|
||||||
} else {
|
} else if (searchWidget.options?.provider === 'custom') {
|
||||||
if (searchWidget.options?.provider === 'custom') {
|
|
||||||
searchProvider = {
|
searchProvider = {
|
||||||
url: searchWidget.options.url
|
url: searchWidget.options.url
|
||||||
}
|
}
|
||||||
|
@ -209,7 +208,6 @@ function Home({ initialSettings }) {
|
||||||
searchProvider = searchProviders[searchWidget.options?.provider];
|
searchProvider = searchProviders[searchWidget.options?.provider];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
function handleKeyDown(e) {
|
function handleKeyDown(e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue