diff --git a/app/(chat)/layout.tsx b/app/(chat)/layout.tsx index bbdb186..2825d59 100644 --- a/app/(chat)/layout.tsx +++ b/app/(chat)/layout.tsx @@ -8,9 +8,7 @@ export default async function ChatLayout({ children }: ChatLayoutProps) { return (
-
- {children} -
+ {children}
) } diff --git a/components/button-scroll-to-bottom.tsx b/components/button-scroll-to-bottom.tsx index 436a6c0..3988e73 100644 --- a/components/button-scroll-to-bottom.tsx +++ b/components/button-scroll-to-bottom.tsx @@ -3,13 +3,20 @@ import * as React from 'react' import { cn } from '@/lib/utils' -import { useAtBottom } from '@/lib/hooks/use-at-bottom' import { Button, type ButtonProps } from '@/components/ui/button' import { IconArrowDown } from '@/components/ui/icons' -export function ButtonScrollToBottom({ className, ...props }: ButtonProps) { - const isAtBottom = useAtBottom() +interface ButtonScrollToBottomProps extends ButtonProps { + isAtBottom: boolean + scrollToBottom: () => void +} +export function ButtonScrollToBottom({ + className, + isAtBottom, + scrollToBottom, + ...props +}: ButtonScrollToBottomProps) { return (