MCPcopy Create free account
hub / github.com/bytebase/bytebase / BannerExternalUrl

Function BannerExternalUrl

frontend/src/react/components/BannersWrapper.tsx:71–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69}
70
71function BannerExternalUrl() {
72 const { t } = useTranslation();
73 const hasPermission = useWorkspacePermission(
74 "bb.settings.setWorkspaceProfile"
75 );
76 const [show, setShow] = useState(true);
77
78 if (!show) return null;
79
80 return (
81 <div className="bg-accent">
82 <div className="mx-auto px-3 py-3">
83 <div className="flex flex-wrap items-center justify-between">
84 <div className="flex w-0 flex-1 items-center">
85 <p className="ml-3 truncate font-medium text-white">
86 {t("banner.external-url")}
87 </p>
88 </div>
89 {hasPermission ? (
90 <div className="order-3 mt-2 w-full shrink-0 sm:order-2 sm:mt-0 sm:w-auto">
91 <RouterLink
92 to={{ name: SETTING_ROUTE_WORKSPACE_GENERAL }}
93 className={buttonVariants({
94 className:
95 "h-auto rounded-md bg-white py-2 pr-2 pl-4 text-base font-medium text-accent shadow-xs hover:bg-indigo-50",
96 })}
97 >
98 {t("common.configure-now")}
99 <Wrench className="ml-1 size-5" />
100 </RouterLink>
101 </div>
102 ) : null}
103 <div className="order-2 -mr-1 shrink-0 sm:order-3 sm:ml-3">
104 <BannerDismissButton
105 label={t("common.dismiss")}
106 onClick={() => setShow(false)}
107 />
108 </div>
109 </div>
110 </div>
111 </div>
112 );
113}
114
115function BannerSubscription() {
116 const { t } = useTranslation();

Callers

nothing calls this directly

Calls 2

useWorkspacePermissionFunction · 0.90
tFunction · 0.50

Tested by

no test coverage detected