Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions amplify.yml

This file was deleted.

11 changes: 0 additions & 11 deletions amplify/auth/resource.ts

This file was deleted.

8 changes: 0 additions & 8 deletions amplify/backend.ts

This file was deleted.

56 changes: 0 additions & 56 deletions amplify/data/resource.ts

This file was deleted.

3 changes: 0 additions & 3 deletions amplify/package.json

This file was deleted.

17 changes: 0 additions & 17 deletions amplify/tsconfig.json

This file was deleted.

43 changes: 6 additions & 37 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,17 @@ import { generateClient } from "aws-amplify/data";
import type { Schema } from "@/amplify/data/resource";
import "./../app/app.css";
import { Amplify } from "aws-amplify";
import outputs from "@/amplify_outputs.json";

import "@aws-amplify/ui-react/styles.css";

Amplify.configure(outputs);

const client = generateClient<Schema>();

export default function App() {
const [todos, setTodos] = useState<Array<Schema["Todo"]["type"]>>([]);

function listTodos() {
client.models.Todo.observeQuery().subscribe({
next: (data) => setTodos([...data.items]),
});
}

useEffect(() => {
listTodos();
}, []);

function createTodo() {
client.models.Todo.create({
content: window.prompt("Todo content"),
});
}

export default function Home() {
return (
<main>
<h1>My todos</h1>
<button onClick={createTodo}>+ new</button>
<ul>
{todos.map((todo) => (
<li key={todo.id}>{todo.content}</li>
))}
</ul>
<div>
🥳 App successfully hosted. Try creating a new todo.
<br />
<a href="https://docs.amplify.aws/nextjs/start/quickstart/nextjs-app-router-client-components/">
Review next steps of this tutorial.
</a>
</div>
<main style={{ padding: "40px", fontFamily: "Arial, sans-serif" }}>
<h1>MxSense Technologies</h1>
<p>Enterprise AI for Quality, Traceability, and Decision Intelligence.</p>
</main>
);
}
}
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
Loading