refactor: docubook@latest template nextjs-docker

This commit is contained in:
gitfromwildan
2026-05-30 18:52:21 +07:00
parent bf2ef37f49
commit 80eb49d968
101 changed files with 1759 additions and 4165 deletions

View File

@@ -1,6 +1,7 @@
"use client";
import { createContext, useContext, useState, useEffect, useCallback } from "react";
import { searchConfig } from "@/lib/search/config";
interface SearchContextType {
isOpen: boolean;
@@ -18,6 +19,9 @@ export function SearchProvider({ children }: { children: React.ReactNode }) {
}, []);
useEffect(() => {
// Only add keyboard shortcut for default search, not Algolia (Algolia handles its own)
if (searchConfig.type === "algolia") return;
const handleKeyDown = (event: KeyboardEvent) => {
if ((event.ctrlKey || event.metaKey) && event.key === "k") {
event.preventDefault();