Skip to content

Commit

Permalink
🎨 UI: improve mobile UI
Browse files Browse the repository at this point in the history
  • Loading branch information
clkefe committed Jan 20, 2024
1 parent fc19b1e commit d0a0e5a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/api/chat/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export async function POST(req: Request) {
content: input.message,
});

// TODO: Will be included in the next release
await insertMessageToDB(threadId, createdMessage);

// await insertMessageToDB(threadId, createdMessage);

return experimental_AssistantResponse(
{ threadId, messageId: createdMessage.id },
Expand Down
4 changes: 2 additions & 2 deletions app/chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export default ({
}, []);

return (
<div className="flex flex-col h-screen">
<ScrollArea className="flex rounded-md w-screen flex-grow justify-center pt-6 mt-16">
<div className="flex flex-col h-[calc(100dvh-4rem)]">
<ScrollArea className="flex flex-grow w-screen justify-center mt-4">
<div className="container mx-auto md:w-9/12 lg:w-5/12">
{messages.map((message: Message, k: number) => {
const isUser = message.role === "user";
Expand Down
9 changes: 8 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en" className={GeistSans.className}>
<head>
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover"
></meta>
</head>

<body className="bg-background text-foreground">
<header className="flex flex-col items-center justify-center w-full py-3 px-4 fixed top-0 border-b border-gray-900">
<div className="flex flex-row items-center justify-between w-full h-full">
Expand Down Expand Up @@ -69,7 +76,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
</div>
</header>

<main className="flex flex-col items-center">
<main className="flex flex-col items-center mt-16">
<ThemeProvider
attribute="class"
defaultTheme="dark"
Expand Down

0 comments on commit d0a0e5a

Please sign in to comment.