Skip to content

Commit

Permalink
Merge pull request reworkd#248 from reworkd/saves
Browse files Browse the repository at this point in the history
bug: fix agent share ui
  • Loading branch information
awtkns authored Apr 19, 2023
2 parents a4d1598 + dff59b4 commit b47c126
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
9 changes: 8 additions & 1 deletion src/components/ChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ import WindowButton from "./WindowButton";
import PDFButton from "./pdf/PDFButton";
import FadeIn from "./motions/FadeIn";
import type { Message } from "../types/agentTypes";
import clsx from "clsx";

interface ChatWindowProps extends HeaderProps {
children?: ReactNode;
className?: string;
showDonation: boolean;
fullscreen?: boolean;
}

const messageListId = "chat-window-message-list";
Expand All @@ -40,6 +42,7 @@ const ChatWindow = ({
title,
showDonation,
onSave,
fullscreen,
}: ChatWindowProps) => {
const [hasUserScrolled, setHasUserScrolled] = useState(false);
const scrollRef = useRef<HTMLDivElement>(null);
Expand Down Expand Up @@ -73,7 +76,11 @@ const ChatWindow = ({
>
<MacWindowHeader title={title} messages={messages} onSave={onSave} />
<div
className="window-heights mb-2 mr-2"
className={clsx(
"mb-2 mr-2 ",
(fullscreen && "max-h-[75vh] flex-grow overflow-auto") ||
"window-heights"
)}
ref={scrollRef}
onScroll={handleScroll}
id={messageListId}
Expand Down
8 changes: 2 additions & 6 deletions src/components/DottedGridBackground.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import clsx from "clsx";

interface DottedGridBackgroundProps {
children: React.ReactNode;
Expand All @@ -9,12 +10,7 @@ const DottedGridBackground = ({
children,
className,
}: DottedGridBackgroundProps) => {
return (
<div className={`${className ? className + " " : ""} background`}>
<div className="lower-gradient" />
{children}
</div>
);
return <div className={clsx(className, "background")}>{children}</div>;
};

export default DottedGridBackground;
3 changes: 2 additions & 1 deletion src/pages/agent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const AgentPage: NextPage = () => {
messages={messages}
title={getAgent?.data?.name}
showDonation={false}
className={"min-h-[80vh] md:w-[80%]"}
className="min-h-[80vh] md:w-[80%]"
fullscreen
/>
<div className="flex flex-row gap-2">
<Button
Expand Down

0 comments on commit b47c126

Please sign in to comment.