File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
src/theme/AnnouncementBar Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -483,6 +483,13 @@ const config = {
483483 themeConfig :
484484 /** @type {import('@docusaurus/preset-classic').ThemeConfig } */
485485 ( {
486+ announcementBar : {
487+ id : 'delegation-toolkit-rename-announcement-bar' ,
488+ content : 'Delegation Toolkit is now renamed to Smart Accounts Kit.' ,
489+ backgroundColor : '#eac2ff' ,
490+ textColor : '#0a0a0a' ,
491+ isCloseable : false ,
492+ } ,
486493 metadata : [
487494 {
488495 name : 'keywords' ,
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import { useLocation } from '@docusaurus/router'
3+
4+ export default function AnnouncementBar ( ) : JSX . Element | null {
5+ const location = useLocation ( )
6+
7+ // Show on smart-accounts-kit paths or main/homepage
8+ const isSmartAccountsKitPath = location . pathname . includes ( '/smart-accounts-kit' )
9+ const isMainPath = location . pathname === '/'
10+
11+ const isValidPath = isSmartAccountsKitPath || isMainPath
12+
13+ if ( ! isValidPath ) {
14+ return null
15+ }
16+
17+ return (
18+ < div className = "theme-announcement-bar" role = "banner" data-announcement-bar = "true" >
19+ < div style = { { textAlign : 'center' } } >
20+ < strong > Delegation Toolkit is now renamed to Smart Accounts Kit.</ strong >
21+ </ div >
22+ </ div >
23+ )
24+ }
You can’t perform that action at this time.
0 commit comments