Use tailwind css
This commit is contained in:
@@ -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;
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user