Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfung committed Nov 12, 2024
1 parent d1632a0 commit 46ff59c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ export default function Activity() {
return (
<>
<div className="flex w-full flex-col">
<div className="flex flex-col sm:gap-4 sm:py-4">
<div className="flex flex-col sm:gap-4">
<main className="grid flex-1 items-start gap-4 py-4 sm:py-0">
<div className="flex flex-col gap-y-2 xl:flex-row xl:items-center xl:justify-between">
<div className="flex flex-col gap-y-2 xl:flex-row xl:items-center xl:justify-between min-h-[theme(space.9)]">
<p className="text-sm text-muted-foreground">{`View raw events generated by team members' activities while interacting with Tabby.`}</p>

{members.length > 0 && (
Expand Down
17 changes: 14 additions & 3 deletions ee/tabby-ui/app/(dashboard)/components/main-content.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
'use client'

import { useEffect, useRef } from 'react'
import { usePathname } from 'next/navigation'

import { ScrollArea } from '@/components/ui/scroll-area'
import { SidebarInset } from '@/components/ui/sidebar'
import { BANNER_HEIGHT, useShowDemoBanner } from '@/components/demo-banner'
Expand All @@ -11,6 +14,8 @@ export default function MainContent({
}: {
children: React.ReactNode
}) {
const pathname = usePathname()
const scroller = useRef<HTMLDivElement>(null)
const [isShowDemoBanner] = useShowDemoBanner()
const [isShowLicenseBanner] = useShowLicenseBanner()
const style =
Expand All @@ -22,11 +27,17 @@ export default function MainContent({
}
: { height: '100vh' }

useEffect(() => {
if (pathname && scroller.current) {
scroller.current.scrollTop = 0
}
}, [pathname])

return (
<>
{/* Wraps right hand side into ScrollArea, making scroll bar consistent across all browsers */}
<SidebarInset style={style}>
<ScrollArea>
<SidebarInset>
{/* Wraps right hand side into ScrollArea, making scroll bar consistent across all browsers */}
<ScrollArea ref={scroller} style={style}>
<Header />
<div className="p-4 lg:p-10">{children}</div>
</ScrollArea>
Expand Down
2 changes: 1 addition & 1 deletion ee/tabby-ui/app/(dashboard)/reports/components/report.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export function Report() {

<LoadingWrapper
loading={fetchingDailyState}
fallback={<Skeleton className="h-8 w-32" />}
fallback={<Skeleton className="h-6 w-32" />}
>
<Select
defaultValue={KEY_SELECT_ALL}
Expand Down

0 comments on commit 46ff59c

Please sign in to comment.