Skip to content

Commit e817b53

Browse files
committed
commit
1 parent f0053b1 commit e817b53

14 files changed

+54
-224
lines changed

app/layout.tsx

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { Metadata } from "next";
2+
import "../styles/globals.css";
3+
4+
export const metadata: Metadata = {
5+
title: "User Management App",
6+
description: "Demo NextJS",
7+
};
8+
9+
export default function RootLayout({
10+
children,
11+
}: Readonly<{
12+
children: React.ReactNode;
13+
}>) {
14+
return (
15+
<html lang="en">
16+
<body>{children}</body>
17+
</html>
18+
);
19+
}

pages/index.tsx app/page.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useState } from "react";
24
import { User } from "../types/user";
35

@@ -10,7 +12,7 @@ export default function Home() {
1012
setLoading(true);
1113
setError(null);
1214
try {
13-
const response = await fetch("/api/users");
15+
const response = await fetch("https://nest-prisma-mongo.onrender.com/users");
1416
if (!response.ok) {
1517
throw new Error(`HTTP error! status: ${response.status}`);
1618
}
File renamed without changes.

next-env.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.

next.config.mjs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3-
reactStrictMode: true,
4-
}
5-
6-
export default nextConfig
3+
reactStrictMode: true,
4+
};
5+
6+
export default nextConfig;

package-lock.json

-143
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"@types/node": "^20",
1818
"@types/react": "^18",
1919
"@types/react-dom": "^18",
20-
"autoprefixer": "^10.4.20",
2120
"postcss": "^8.4.47",
2221
"tailwindcss": "^3.4.12",
2322
"typescript": "^5"

pages/api/users.ts

-22
This file was deleted.

pages/app.tsx

-19
This file was deleted.

postcss.config.js

-6
This file was deleted.

tailwind.config.js

-10
This file was deleted.

tailwind.config.ts

-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ const config: Config = {
77
"./app/**/*.{js,ts,jsx,tsx,mdx}",
88
],
99
theme: {
10-
extend: {
11-
colors: {
12-
background: "var(--background)",
13-
foreground: "var(--foreground)",
14-
},
15-
},
1610
},
1711
plugins: [],
1812
};

tsconfig.json

+21-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -13,8 +17,20 @@
1317
"resolveJsonModule": true,
1418
"isolatedModules": true,
1519
"jsx": "preserve",
16-
"incremental": true
20+
"incremental": true,
21+
"plugins": [
22+
{
23+
"name": "next"
24+
}
25+
]
1726
},
18-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
19-
"exclude": ["node_modules"]
20-
}
27+
"include": [
28+
"next-env.d.ts",
29+
"**/*.ts",
30+
"**/*.tsx",
31+
".next/types/**/*.ts"
32+
],
33+
"exclude": [
34+
"node_modules"
35+
]
36+
}

types/user.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export interface User {
2-
id: string;
3-
email: string;
4-
firstName: string;
5-
lastName: string;
6-
age: number;
7-
}
2+
id: string;
3+
email: string;
4+
firstName: string;
5+
lastName: string;
6+
age: number;
7+
}

0 commit comments

Comments
 (0)