Skip to content

Commit

Permalink
Merge pull request #4 from quantum-brackets/hello-api
Browse files Browse the repository at this point in the history
chore: created empty next api
  • Loading branch information
henzyd authored Aug 23, 2024
2 parents 579d7c2 + 1853847 commit 1f99f87
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/api/hello/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { NextResponse } from "next/server";

export async function GET() {
return NextResponse.json({
data: "Hello World",
});
}
5 changes: 5 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import Link from "next/link";
import { notifyError, notifyInfo, notifySuccess } from "~/utils/toast";

export default function Home() {
Expand All @@ -16,6 +17,10 @@ export default function Home() {
<button onClick={() => notifySuccess({ message: "success" })}>success</button>
<button onClick={() => notifyInfo({ message: "info" })}>info</button>
</div>

<div>
<Link href={"/api/hello"}>Go to API</Link>
</div>
</main>
);
}

0 comments on commit 1f99f87

Please sign in to comment.