(props: Props)
| 8 | } |
| 9 | |
| 10 | const DBHubBanner = (props: Props) => { |
| 11 | const { className, alwaysShow } = props; |
| 12 | const { t } = useTranslation(); |
| 13 | const [hideBanner, setHideBanner] = useLocalStorage("hide-github-banner", false); |
| 14 | const show = alwaysShow || !hideBanner; |
| 15 | |
| 16 | return ( |
| 17 | <div |
| 18 | className={`${!show && "!hidden"} ${ |
| 19 | className || "" |
| 20 | } relative w-full flex flex-row justify-start sm:justify-center items-center px-4 py-1 bg-blue-50 dark:bg-blue-900`} |
| 21 | > |
| 22 | <span className="text-sm leading-6 pr-4"> |
| 23 | <a |
| 24 | href="https://github.com/bytebase/dbhub" |
| 25 | target="_blank" |
| 26 | rel="noopener noreferrer" |
| 27 | className="text-blue-600 dark:text-blue-300 hover:underline font-medium" |
| 28 | > |
| 29 | Check out DBHub - a universal database MCP server to be used by Cursor, Claude Desktop, and more |
| 30 | </a> |
| 31 | </span> |
| 32 | {!alwaysShow && ( |
| 33 | <button className="absolute right-2 sm:right-4 opacity-60 hover:opacity-100" onClick={() => setHideBanner(true)}> |
| 34 | <Icon.BiX className="w-6 h-auto" /> |
| 35 | </button> |
| 36 | )} |
| 37 | </div> |
| 38 | ); |
| 39 | }; |
| 40 | |
| 41 | export default DBHubBanner; |
nothing calls this directly
no outgoing calls
no test coverage detected