Skip to content

Commit 98a7805

Browse files
Merge pull request #229 from asksa1256/Next-이상달-sprint9-1
[이상달] sprint9
2 parents 8d163dd + 61ed467 commit 98a7805

49 files changed

Lines changed: 4867 additions & 1853 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

.gitignore

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
# dependencies
44
/node_modules
55
/.pnp
6-
.pnp.js
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
713

814
# testing
915
/coverage
@@ -23,9 +29,10 @@
2329
npm-debug.log*
2430
yarn-debug.log*
2531
yarn-error.log*
32+
.pnpm-debug.log*
2633

27-
# local env files
28-
.env*.local
34+
# env files (can opt-in for committing if needed)
35+
.env*
2936

3037
# vercel
3138
.vercel

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
1+
2+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
23

34
## Getting Started
45

@@ -16,13 +17,11 @@ bun dev
1617

1718
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
1819

19-
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
2020

21-
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
21+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
2222

23-
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
23+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
2424

25-
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
2625

2726
## Learn More
2827

@@ -31,10 +30,14 @@ To learn more about Next.js, take a look at the following resources:
3130
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
3231
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
3332

34-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
33+
34+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
35+
3536

3637
## Deploy on Vercel
3738

3839
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
3940

40-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
41+
42+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
43+

app/global-error.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"use client";
2+
3+
export default function GlobalError({
4+
error,
5+
reset,
6+
}: {
7+
error: Error & { digest?: string };
8+
reset: () => void;
9+
}) {
10+
return (
11+
<html>
12+
<body>
13+
<h2>에러가 발생했습니다.</h2>
14+
<p>{error.message}</p>
15+
<button onClick={() => reset()}>다시 시도하기</button>
16+
</body>
17+
</html>
18+
);
19+
}

app/layout.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import type { Metadata } from "next";
2+
import "@/styles/reset.css";
3+
import "@/styles/globals.css";
4+
import Header from "@/components/Header";
5+
import nanumSquare from "@/assets/fonts/NanumSquare/nanumSquare";
6+
import QueryProvider from "./providers/QueryProvider";
7+
8+
export const metadata: Metadata = {
9+
title: "간편한 투두리스트 - Do it",
10+
description: "Generated by create next app",
11+
};
12+
13+
export default function RootLayout({
14+
children,
15+
}: Readonly<{
16+
children: React.ReactNode;
17+
}>) {
18+
return (
19+
<html lang="ko">
20+
<body className={`${nanumSquare.className} bg-gray-50`}>
21+
<Header />
22+
<div className="my-6 md:w-full lg:w-[1200px] lg:mx-auto">
23+
<QueryProvider>{children}</QueryProvider>
24+
</div>
25+
</body>
26+
</html>
27+
);
28+
}

app/page.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import TodoClient from "@/components/Todos/TodoClient";
2+
import { getTodos } from "@/lib/api";
3+
import { Suspense } from "react";
4+
import TodoLoading from "@/components/Todos/TodoLoading";
5+
6+
const Home = async () => {
7+
const initialItems = await getTodos();
8+
9+
return (
10+
<Suspense fallback={<TodoLoading />}>
11+
<TodoClient initialItems={initialItems} />
12+
</Suspense>
13+
);
14+
};
15+
16+
export default Home;

app/providers/QueryProvider.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"use client";
2+
3+
import { useState, ReactNode } from "react";
4+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
5+
6+
const QueryProvider = ({ children }: { children: ReactNode }) => {
7+
const [queryClient] = useState(() => new QueryClient());
8+
9+
return (
10+
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
11+
);
12+
};
13+
14+
export default QueryProvider;
551 KB
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import localFont from "next/font/local";
2+
3+
const santokki = localFont({
4+
src: [
5+
{
6+
path: "./HSSantokki-Regular.ttf",
7+
weight: "400",
8+
style: "normal",
9+
},
10+
],
11+
variable: "--font-santokki",
12+
display: "swap",
13+
});
14+
15+
export default santokki;
229 KB
Binary file not shown.

0 commit comments

Comments
 (0)