Skip to content

Commit b47c126

Browse files
authored
Merge pull request #248 from reworkd/saves
bug: fix agent share ui
2 parents a4d1598 + dff59b4 commit b47c126

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/components/ChatWindow.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ import WindowButton from "./WindowButton";
2424
import PDFButton from "./pdf/PDFButton";
2525
import FadeIn from "./motions/FadeIn";
2626
import type { Message } from "../types/agentTypes";
27+
import clsx from "clsx";
2728

2829
interface ChatWindowProps extends HeaderProps {
2930
children?: ReactNode;
3031
className?: string;
3132
showDonation: boolean;
33+
fullscreen?: boolean;
3234
}
3335

3436
const messageListId = "chat-window-message-list";
@@ -40,6 +42,7 @@ const ChatWindow = ({
4042
title,
4143
showDonation,
4244
onSave,
45+
fullscreen,
4346
}: ChatWindowProps) => {
4447
const [hasUserScrolled, setHasUserScrolled] = useState(false);
4548
const scrollRef = useRef<HTMLDivElement>(null);
@@ -73,7 +76,11 @@ const ChatWindow = ({
7376
>
7477
<MacWindowHeader title={title} messages={messages} onSave={onSave} />
7578
<div
76-
className="window-heights mb-2 mr-2"
79+
className={clsx(
80+
"mb-2 mr-2 ",
81+
(fullscreen && "max-h-[75vh] flex-grow overflow-auto") ||
82+
"window-heights"
83+
)}
7784
ref={scrollRef}
7885
onScroll={handleScroll}
7986
id={messageListId}
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from "react";
2+
import clsx from "clsx";
23

34
interface DottedGridBackgroundProps {
45
children: React.ReactNode;
@@ -9,12 +10,7 @@ const DottedGridBackground = ({
910
children,
1011
className,
1112
}: DottedGridBackgroundProps) => {
12-
return (
13-
<div className={`${className ? className + " " : ""} background`}>
14-
<div className="lower-gradient" />
15-
{children}
16-
</div>
17-
);
13+
return <div className={clsx(className, "background")}>{children}</div>;
1814
};
1915

2016
export default DottedGridBackground;

src/pages/agent/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ const AgentPage: NextPage = () => {
4242
messages={messages}
4343
title={getAgent?.data?.name}
4444
showDonation={false}
45-
className={"min-h-[80vh] md:w-[80%]"}
45+
className="min-h-[80vh] md:w-[80%]"
46+
fullscreen
4647
/>
4748
<div className="flex flex-row gap-2">
4849
<Button

0 commit comments

Comments
 (0)