File tree Expand file tree Collapse file tree 4 files changed +17
-1
lines changed
Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import { hello } from "./chatServer" ;
4+
5+ export function ChatForm ( ) {
6+ return < button className = "btn" onClick = { hello } > あああ</ button >
7+ }
Original file line number Diff line number Diff line change 1+ "use server" ;
2+
3+ export async function hello ( ) {
4+ console . log ( "hello, world" ) ;
5+ }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { notFound } from "next/navigation";
22import { readFile } from "node:fs/promises" ;
33import { join } from "node:path" ;
44import Markdown , { Components } from "react-markdown" ;
5+ import { ChatForm } from "./chatForm" ;
56
67export default async function Page ( {
78 params,
@@ -24,6 +25,7 @@ export default async function Page({
2425 return (
2526 < div className = "p-4" >
2627 < Markdown components = { components } > { mdContent } </ Markdown >
28+ < ChatForm />
2729 </ div >
2830 ) ;
2931}
Original file line number Diff line number Diff line change 11export default function Home ( ) {
2- return < div className = "p-4" > This is root page</ div > ;
2+ return < div className = "p-4" >
3+ This is root page
4+ </ div > ;
35}
You can’t perform that action at this time.
0 commit comments