Skip to content

Commit

Permalink
feat: add sidebar tab
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonhyejin committed Oct 23, 2024
1 parent 56ea997 commit cf1c7d0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs-website/src/components/SecondNavbar/SecondNavbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,31 @@ function SecondNavbarContent() {
const { colorMode, setColorMode } = useColorMode();
const location = useLocation();
const isDocsPath = location.pathname.startsWith('/docs');

const isAcrylSidebar = location.pathname.includes('/managed-datahub');
const isCoreSidebar = !isAcrylSidebar;

if (!isDocsPath) {
return null;
}

return (
<div className={clsx(styles.secondNavbar, colorMode === 'dark' && styles.darkMode)}>
<div className={styles.container}>
<div className={styles.coreCloudSwitch}>
<Link
className={clsx(styles.docsSwitchButton, isCoreSidebar && styles.activeButton)}
to="/docs/features"
>
DataHub Core
</Link>
<Link
className={clsx(styles.docsSwitchButton, isAcrylSidebar && styles.activeButton)}
to="/docs/cloud/managed-datahub-overview"
>
DataHub Cloud
</Link>
</div>
<div className={styles.versionDropdown}>
<DocsVersionDropdownNavbarItem
docsPluginId="default"
Expand Down

0 comments on commit cf1c7d0

Please sign in to comment.