Use tailwind css

This commit is contained in:
Ben Ramey
2022-08-27 14:23:30 -05:00
parent 696ca6a393
commit c45d304fdd
12 changed files with 4603 additions and 228 deletions

View File

@@ -1,27 +0,0 @@
import db from "../../../lib/db";
const handler = async (req, res) => {
const { method } = req;
switch (method) {
case "GET":
await get(req, res);
default:
res.setHeader("Allow", ["GET"]);
res.status(405).end(`Method ${method} Not Allowed`);
}
};
const get = async (req, res) => {
const params = {
TableName: process.env.FMN_DYNAMODB_TABLENAME,
KeyConditionExpression: "hk = :hk",
ExpressionAttributeValues: { ":hk": "benramey@fastmail.com" },
};
let user = await db.query(params).promise();
res.status(200).json(user);
};
export default handler;

View File

@@ -6,7 +6,7 @@ function Home() {
return (
<Layout user={user} loading={loading}>
<h1>Next.js and Auth0 Example</h1>
<h1 className="text-3xl font-bold underline">Hello world!</h1>
{loading && <p>Loading login info...</p>}
@@ -31,10 +31,10 @@ function Home() {
<p>
<form method="POST" action="/api/v1/bookmarks">
<label for="title">title: </label>
<input type="text" name="title"/>
<input type="text" name="title" />
<br />
<label for="url">url:</label>
<input type="text" name="url"/>
<input type="text" name="url" />
<button type="submit">Add bookmark</button>
</form>
</p>