diff --git a/bun.lock b/bun.lock index 80ca957c..6a4d69be 100644 --- a/bun.lock +++ b/bun.lock @@ -7,8 +7,8 @@ "dependencies": { "@codesandbox/sandpack-react": "^2.20.0", "@codesandbox/sandpack-themes": "^2.0.21", - "@docsearch/css": "^4.6.0", - "@docsearch/js": "^4.6.0", + "@docsearch/css": "^5.1.1", + "@docsearch/js": "^5.1.1", "@fontsource/montserrat": "^5.2.8", "@fontsource/source-code-pro": "^5.2.7", "@github/mini-throttle": "^2.1.1", @@ -93,9 +93,9 @@ "@date-fns/tz": ["@date-fns/tz@1.5.0", "", {}, "sha512-lwYN/vDPeNRULcepoE/LO2Pgx+7/RV+S9ARfbc9lr2DtGkOD7pAiruHvbR1RX3Qyf6ja47EWJDMsNK5vK08DJg=="], - "@docsearch/css": ["@docsearch/css@4.7.0", "", {}, "sha512-Sk5xkdRFeE7PeWjG9l4AfTwdvMfr9wHiwNNCpHXT4v4SNyNMKdHGvEILc31BgaVFGDDNbv5u/a73tofRiwbEZw=="], + "@docsearch/css": ["@docsearch/css@5.1.1", "", {}, "sha512-+sPTcGV9QVTB7m9KRl2uym1lY3N3lwV2Y4KRttdZF7MPrS3Wd/Dkp5LarZTk81IpqF3hXxxyxhkl5vwQZGuGUQ=="], - "@docsearch/js": ["@docsearch/js@4.7.0", "", {}, "sha512-x5lCqu1tetgsJFkjQ6VSocbHldsRkGEgwg5N98Vx21sq/V5wcmj4u226PY9k+TEpIgQ772zlYbPLTPicWyGnpA=="], + "@docsearch/js": ["@docsearch/js@5.1.1", "", {}, "sha512-Kez8gF8uqDM0KasXCa48I5u9Gctjas3mnmPRIdVhWPu+chiglm5mL5XfWxHLnfc9JBTvKZVZ5fNYN/w+aGGVpA=="], "@fontsource/montserrat": ["@fontsource/montserrat@5.3.0", "", {}, "sha512-iQPDtZOnmM5ih4JBGaMSXisRap0ixb9bAUw2hDtY7EjVfaqiiNlKtVuJl9XclxUwtwMMHNcWXfQR6zI9x05+Tg=="], diff --git a/package.json b/package.json index 3175968c..2c7fcbd0 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,8 @@ "dependencies": { "@codesandbox/sandpack-react": "^2.20.0", "@codesandbox/sandpack-themes": "^2.0.21", - "@docsearch/css": "^4.6.0", - "@docsearch/js": "^4.6.0", + "@docsearch/css": "^5.1.1", + "@docsearch/js": "^5.1.1", "@fontsource/montserrat": "^5.2.8", "@fontsource/source-code-pro": "^5.2.7", "@github/mini-throttle": "^2.1.1", diff --git a/src/components/DocSearch.tsx b/src/components/DocSearch.tsx index da426937..4d7891d9 100644 --- a/src/components/DocSearch.tsx +++ b/src/components/DocSearch.tsx @@ -1,14 +1,18 @@ import { useEffect } from 'react' -import docsearch from '@docsearch/js' +import docsearch from '@docsearch/js/docsearch' export function DocSearch() { useEffect(() => { - docsearch({ + const instance = docsearch({ appId: '38BPOKYOZ2', apiKey: 'aa152d345260f94e9c0b177ed5437c9e', - indexName: 'sweetalert2', + indices: ['sweetalert2'], container: '#docsearch', }) + + return () => { + instance.destroy() + } }, []) return
diff --git a/styles/styles.scss b/styles/styles.scss index ffdfe039..f769bad5 100644 --- a/styles/styles.scss +++ b/styles/styles.scss @@ -993,10 +993,6 @@ $bouncing-logo-min-height: 35%; justify-content: center; margin: 1.5em 0 2em !important; - button { - box-shadow: var(--docsearch-searchbox-shadow); - } - @media all and (width <= 768px) { position: fixed; z-index: 1;