update darkmode config

This commit is contained in:
Trance-0
2025-10-27 12:15:43 -05:00
parent fb1ffcd040
commit f634254bca
4 changed files with 9 additions and 6 deletions

View File

@@ -2,17 +2,16 @@
// sample code from https://docsearch.algolia.com/docs/docsearch
import { DocSearch } from '@docsearch/react';
import { useThemeConfig } from 'nextra-theme-docs'
import '@docsearch/css';
function AlgoliaSearch() {
function AlgoliaSearch({ darkMode }: { darkMode: boolean }) {
return (
<DocSearch
appId={process.env.NEXT_SEARCH_ALGOLIA_APP_ID || 'NKGLZZZUBC'}
indexName={process.env.NEXT_SEARCH_ALGOLIA_INDEX_NAME || 'notenextra_trance_0'}
apiKey={process.env.NEXT_SEARCH_ALGOLIA_API_KEY || '727b389a61e862e590dfab9ce9df31a2'}
theme={useThemeConfig().darkMode ? 'dark' : 'light'}
theme={darkMode ? 'dark' : 'light'}
/>
);
}