From 9361ba0a913d8f7202ce8c77efd9aa19e94245ac Mon Sep 17 00:00:00 2001 From: Imran Jami Date: Fri, 28 Feb 2025 14:42:17 -0800 Subject: [PATCH] Update theme.config.tsx --- theme.config.tsx | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/theme.config.tsx b/theme.config.tsx index 841fe4b6e..2eb268c6a 100644 --- a/theme.config.tsx +++ b/theme.config.tsx @@ -1,3 +1,5 @@ +/** @format */ + import React from 'react'; import { DocsThemeConfig } from 'nextra-theme-docs'; import { useRouter } from 'next/router'; @@ -12,7 +14,13 @@ import { useFeature } from '@growthbook/growthbook-react'; const config: DocsThemeConfig = { logo: ( <> - + ๐ŸŽ‰ We are deprecating the Optimism SDK and migrating all tutorials to use viem/op-stack. Read more โ†’ + text: ( + + ๐ŸŽ‰ We are deprecating the Optimism SDK and migrating all tutorials to use viem/op-stack. + Read more โ†’ + + ) }, search: { component: Search @@ -49,7 +62,12 @@ const config: DocsThemeConfig = { extraContent: () => ( <>
- +
) @@ -73,18 +91,25 @@ const config: DocsThemeConfig = { head: () => { const { asPath, defaultLocale, locale } = useRouter(); const { frontMatter } = useConfig(); - const url = 'https://docs.optimism.io' + (defaultLocale === locale ? asPath : `/${locale}${asPath}`); + const url = + 'https://docs.optimism.io' + (defaultLocale === locale ? asPath : `/${locale}${asPath}`); const enableDocsAIWidget = useFeature('enable_docs_ai_widget').on; return ( <> - + - + {enableDocsAIWidget && ( @@ -102,6 +127,8 @@ const config: DocsThemeConfig = { data-modal-ask-ai-input-placeholder='Ask me a question about building on Optimism' data-button-hide='true' data-max-tokens='100' + data-consent-required='true' + data-consent-screen-disclaimer='This is an AI assistant powered by [kapa.ai](https://www.kapa.ai/). Please be aware that any information, including personal information or sensitive data, shared by you is provided at your own risk and may be accessed by [kapa.ai](https://www.kapa.ai/) and Optimism. Your use is further subject to the [kapa.ai Terms of Service](https://www.kapa.ai/content/terms-of-service) and the [Optimism Terms of Service](https://www.optimism.io/terms). Please note that all responses are generated by AI so remember to use your own judgment.By clicking the โ€œI agree, letโ€™s chatโ€ button, you are confirming your understanding of and agreement with the above.' data-modal-disclaimer='This is an AI assistant powered by kapa.ai. Please be aware that any information, including personal information or sensitive data, shared by you herein is provided at your own risk and subject to the kapa.ai [privacy policy](https://www.kapa.ai/content/privacy-policy). Please note that all responses are generated by AI so remember to use your own judgment.' > )}