Skip to content

Commit

Permalink
chore: Update layout and page components
Browse files Browse the repository at this point in the history
  • Loading branch information
minpeter committed Jun 3, 2024
1 parent c99120c commit 9499d82
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export default function RootLayout({
return (
<html lang="en">
<body className={inter.className}>
<main className="min-h-screen p-20">{children}</main>
<main className="min-h-screen container py-5 max-w-screen-md">
{children}
</main>
<Toaster />
</body>
</html>
Expand Down
12 changes: 8 additions & 4 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function Home() {
});

return (
<div className="container flex flex-col gap-10">
<div className="flex flex-col gap-10">
<div className="flex flex-col gap-2 items-center">
<Image
src={friendliGopher}
Expand Down Expand Up @@ -73,12 +73,16 @@ export default function Home() {
}}
>
<Textarea
className={"h-96"}
className="h-44"
value={isLoading && completion.length > 0 ? completion.trim() : text}
onChange={(e) => {
if (!isLoading) setText(e.target.value);
}}
placeholder="It was a dark and stormy night..."
placeholder={`package main
func main() {
// The generated code will appear here...
}`}
aria-label="Text"
onKeyDown={(e) => {
if ((e.ctrlKey || e.metaKey) && e.key === "Enter") {
Expand All @@ -88,7 +92,7 @@ export default function Home() {
}}
/>

<div className="px-3 py-4 w-full whitespace-pre-wrap min-h-10 bg-neutral-100 rounded-md">
<div className="px-3 py-4 w-full whitespace-pre-wrap h-32 bg-neutral-100 rounded-md max-h-32 overflow-y-scroll">
{error || result ? (
error ? (
<div className="text-red-500">{error}</div>
Expand Down

0 comments on commit 9499d82

Please sign in to comment.