mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 14:58:47 +00:00
Use configured search provider, allow disable internet search
This commit is contained in:
parent
4e17628f97
commit
11d03be4de
4 changed files with 24 additions and 17 deletions
|
@ -3,7 +3,7 @@ import { useTranslation } from "next-i18next";
|
|||
import { FiSearch } from "react-icons/fi";
|
||||
import { SiDuckduckgo, SiMicrosoftbing, SiGoogle, SiBaidu, SiBrave } from "react-icons/si";
|
||||
|
||||
const providers = {
|
||||
export const searchProviders = {
|
||||
google: {
|
||||
name: "Google",
|
||||
url: "https://www.google.com/search?q=",
|
||||
|
@ -39,7 +39,7 @@ const providers = {
|
|||
export default function Search({ options }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const provider = providers[options.provider];
|
||||
const provider = searchProviders[options.provider];
|
||||
const [query, setQuery] = useState("");
|
||||
|
||||
if (!provider) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue