Skip to content

Commit

Permalink
Merge branch 'feat/gluestack-ui' of github.com:GeekyAnts/nativebase-d…
Browse files Browse the repository at this point in the history
…ocs into feat/gluestack-ui
  • Loading branch information
akash3gtm committed Dec 20, 2023
2 parents 3f073e0 + dbd58cf commit f85c9b2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
8 changes: 6 additions & 2 deletions layouts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ function Layout({
} else {
setActiveSidebarItem(path.join(...pathArray).split("#")[0]);
}
// @ts-ignore
document.getElementById("scrollview-id").scrollTop = 0;
try {
// @ts-ignore
document.getElementById("scrollview-id").scrollTop = 0;
} catch (Error) {
//
}
}, [content]);

useEffect(() => {
Expand Down
20 changes: 15 additions & 5 deletions src/new-components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
Modal,
Heading,
} from "native-base";

import NativebaseLogo from "./NativebaseLogo";
import { isLatestVersion, isLatestVersionSlug } from "../utils";
import { useContext } from "react";
Expand Down Expand Up @@ -72,6 +73,13 @@ export default function Navbar(props: any) {
router.push(path);
};
const [showModal, setShowModal] = React.useState(false);

const [isSSR, setIsSSR] = React.useState(true);

useEffect(() => {
setIsSSR(false);
}, []);

return (
<>
<HStack
Expand Down Expand Up @@ -171,11 +179,13 @@ export default function Navbar(props: any) {
Announcing NativeBase Startup+ bundle 🎉
</NBLink> */}
</HStack>
<DocSearch
appId="QT6M4WLEXP"
indexName="nativebase-v3"
apiKey="3030e522f40cbea2b0386cdca3d88503"
/>
{!isSSR && (
<DocSearch
appId="QT6M4WLEXP"
indexName="nativebase-v3"
apiKey="3030e522f40cbea2b0386cdca3d88503"
/>
)}
<HStack space="6" alignItems="center">
<AlgoliaSearchButton />
<NBLink
Expand Down

0 comments on commit f85c9b2

Please sign in to comment.