Skip to content

Commit

Permalink
disallow cmd+k for mendable search in website (#9599)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina authored Oct 11, 2023
1 parent 95cdf70 commit 812a93f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
35 changes: 19 additions & 16 deletions website/src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,25 @@ export function Search() {
const isMounted = useMounted();
return (
<div className="w-[250px] max-sm:hidden">
<MendableSearchBar
style={{
darkMode: isMounted && resolvedTheme === 'dark',
accentColor: 'rgb(0, 76, 163)',
}}
placeholder="Ask a question"
dialogPlaceholder="What are you looking for?"
anon_key={process.env.NEXT_PUBLIC_MENDABLE_ANON_KEY!}
botIcon={<span>🤖</span>}
userIcon={<span>🧑‍💻</span>}
messageSettings={{
openSourcesInNewTab: false,
prettySources: true,
}}
welcomeMessage="Hi, I'm your AI assistant. How can I help you?"
/>
{isMounted && (
<MendableSearchBar
style={{
darkMode: resolvedTheme === 'dark',
accentColor: 'rgb(0, 76, 163)',
}}
placeholder="Ask a question"
dialogPlaceholder="What are you looking for?"
anon_key={process.env.NEXT_PUBLIC_MENDABLE_ANON_KEY!}
botIcon={<span>🤖</span>}
userIcon={<span>🧑‍💻</span>}
messageSettings={{
openSourcesInNewTab: false,
prettySources: true,
}}
welcomeMessage="Hi, I'm your AI assistant. How can I help you?"
cmdShortcutKey=""
/>
)}
</div>
);
}
1 change: 0 additions & 1 deletion website/theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default defineConfig({
search: {
component: Search,
},

main({ children }) {
const { resolvedTheme } = useTheme();
const { route } = useRouter();
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4510,16 +4510,16 @@
resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.2.tgz#fc25ad9943bcac11cceb8168db4f275e0e72e756"
integrity sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==

"@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2":
version "2.0.6"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d"
integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==

"@types/unist@^3.0.0":
"@types/unist@*", "@types/unist@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.0.tgz#988ae8af1e5239e89f9fbb1ade4c935f4eeedf9a"
integrity sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==

"@types/unist@^2.0.0", "@types/unist@^2.0.2":
version "2.0.6"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d"
integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==

"@types/ws@^8.0.0":
version "8.5.4"
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.4.tgz#bb10e36116d6e570dd943735f86c933c1587b8a5"
Expand Down

0 comments on commit 812a93f

Please sign in to comment.