Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button count #32

Merged
merged 14 commits into from
Mar 25, 2024
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# production
/build
yarn.lock

# misc
.DS_Store
Expand Down
6 changes: 3 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import NavBar from "./components/navbar";
import "./globals.css";
import { Inter } from "next/font/google";

////
const inter = Inter({ subsets: ["latin"] });

////
export const metadata = {
title: "Create Next App",
description: "Generated by create next app",
};

//
export default function RootLayout({
children,
}: {
Expand Down
9 changes: 8 additions & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
"use client";

import { useChat } from "ai/react";

import { useState } from "react";
//
export default function Dual() {
const { messages, input, handleInputChange, handleSubmit, data } = useChat();
const { count, setCount } = useState(0);

return (
<div className="flex">
<div>
<h1>Count: {count}</h1>
<input onClick={() => setCount(count + 1)}>Increment</input>
</div>
<div className="flex flex-col w-full max-w-md py-24 mx-auto stretch">
{messages.length > 0
? messages.map((m) => (
Expand Down
2 changes: 1 addition & 1 deletion app/tri-display/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useChat } from "ai/react";

//
export default function Dual() {
const { messages, input, handleInputChange, handleSubmit, data } = useChat();
return (
Expand Down
1 change: 1 addition & 0 deletions contributing/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# contributing
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# readme
Loading