Move group navbar to top (#895)
This commit is contained in:
parent
5d65bb5bb1
commit
6aa45a2d12
|
@ -32,7 +32,7 @@ export function GroupNavBar(props: {
|
||||||
const user = useUser()
|
const user = useUser()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav className="fixed inset-x-0 bottom-0 z-20 flex justify-between border-t-2 bg-white text-xs text-gray-700 lg:hidden">
|
<nav className="z-20 flex justify-between border-t-2 bg-white text-xs text-gray-700 lg:hidden">
|
||||||
{mobileGroupNavigation.map((item) => (
|
{mobileGroupNavigation.map((item) => (
|
||||||
<NavBarItem
|
<NavBarItem
|
||||||
key={item.name}
|
key={item.name}
|
||||||
|
|
|
@ -262,7 +262,11 @@ export default function GroupPage(props: {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TopGroupNavBar group={group} />
|
<TopGroupNavBar
|
||||||
|
group={group}
|
||||||
|
currentPage={sidebarPages[sidebarIndex].key}
|
||||||
|
onClick={onSidebarClick}
|
||||||
|
/>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
|
@ -287,19 +291,19 @@ export default function GroupPage(props: {
|
||||||
{pageContent}
|
{pageContent}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
<GroupNavBar
|
|
||||||
currentPage={sidebarPages[sidebarIndex].key}
|
|
||||||
onClick={onSidebarClick}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function TopGroupNavBar(props: { group: Group }) {
|
export function TopGroupNavBar(props: {
|
||||||
|
group: Group
|
||||||
|
currentPage: string
|
||||||
|
onClick: (key: string) => void
|
||||||
|
}) {
|
||||||
return (
|
return (
|
||||||
<header className="sticky top-0 z-50 w-full pb-2 md:hidden lg:col-span-12">
|
<header className="sticky top-0 z-50 w-full border-b border-gray-200 md:hidden lg:col-span-12">
|
||||||
<div className="flex items-center border-b border-gray-200 bg-white px-4">
|
<div className="flex items-center bg-white px-4">
|
||||||
<div className="flex-shrink-0">
|
<div className="flex-shrink-0">
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<a className="text-indigo-700 hover:text-gray-500 ">
|
<a className="text-indigo-700 hover:text-gray-500 ">
|
||||||
|
@ -313,6 +317,7 @@ export function TopGroupNavBar(props: { group: Group }) {
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<GroupNavBar currentPage={props.currentPage} onClick={props.onClick} />
|
||||||
</header>
|
</header>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user