Skip to content

Commit 170b2a7

Browse files
committed
merge: 컨플릭트 해결
2 parents 57ae781 + 350c8a0 commit 170b2a7

Some content is hidden

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

72 files changed

+3052
-531
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/node_modules
55
/.pnp
66
.pnp.js
7+
.yarn/install-state.gz
78

89
# testing
910
/coverage
@@ -34,3 +35,4 @@ yarn-error.log*
3435
# typescript
3536
*.tsbuildinfo
3637
next-env.d.ts
38+
node_modules

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ bun dev
1616

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

19-
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
20-
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`.
22-
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.
19+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
2420

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

app/folder/page.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { Footer } from "@/src/components/Footer";
2+
import { Header } from "@/src/components/Header";
3+
import LinkManager from "@/src/components/LinkManager/LinkManager";
4+
import { END_POINT } from "@/src/constants";
5+
import getFormattedLinks from "@/src/utils/getFormattedLinks";
6+
7+
async function getFetchData(url: string) {
8+
try {
9+
const res = await fetch(url);
10+
const result = await res.json();
11+
return result;
12+
} catch (error) {
13+
if (error instanceof Error) {
14+
console.error(error.message);
15+
}
16+
}
17+
}
18+
19+
export default async function FolderPage() {
20+
const linksData = await getFetchData(END_POINT.LINKS);
21+
const links = getFormattedLinks(linksData.data);
22+
const favorites = await getFetchData(END_POINT.FOLDERS);
23+
24+
return (
25+
<>
26+
<Header />
27+
<LinkManager links={links} favorites={favorites.data} />
28+
<Footer />
29+
</>
30+
);
31+
}

app/layout.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import "@/src/styles/global.scss";
2+
import { ReactNode } from "react";
3+
4+
export const metadata = {
5+
title: "Linkbrary",
6+
description: "bokeeey weeklyMission",
7+
};
8+
9+
export default function RootLayout({ children }: { children: ReactNode }) {
10+
return (
11+
<html lang="ko">
12+
<body>{children}</body>
13+
</html>
14+
);
15+
}

app/page.module.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.input {
2+
padding: 200px;
3+
}

app/page.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Auth from "@/src/components/Auth/Auth";
2+
import styles from "./page.module.scss";
3+
4+
export default function Home() {
5+
return (
6+
<>
7+
<div className={styles.input}>
8+
<Auth />
9+
</div>
10+
</>
11+
);
12+
}

app/shared/page.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { Footer } from "@/src/components/Footer";
2+
import { Header } from "@/src/components/Header";
3+
import LinkManager from "@/src/components/LinkManager/LinkManager";
4+
import { END_POINT } from "@/src/constants";
5+
6+
async function getFetchData(url: string) {
7+
try {
8+
const res = await fetch(url);
9+
const result = await res.json();
10+
return result;
11+
} catch (error) {
12+
if (error instanceof Error) {
13+
console.error(error.message);
14+
}
15+
}
16+
}
17+
18+
export default async function sharedPage() {
19+
const sharedPageDatas = await getFetchData(END_POINT.SHARED_LINKS);
20+
21+
return (
22+
<>
23+
<Header />
24+
<LinkManager
25+
links={sharedPageDatas.folder.links}
26+
userProfile={sharedPageDatas.folder}
27+
/>
28+
<Footer />
29+
</>
30+
);
31+
}

app/signin/page.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// import Auth from "@/src/components/Auth/Auth";
2+
// import AuthHookForm from "@/src/components/Auth/AuthHookForm";
3+
import SignInForm from "@/src/components/Auth/SignInForm/SignInForm";
4+
5+
export default function signinPage() {
6+
return (
7+
<>
8+
{/* <Auth /> */}
9+
{/* <AuthHookForm /> */}
10+
<SignInForm />
11+
</>
12+
);
13+
}

next.config.mjs

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
images: {
4+
// domains는 권장하지 않는 스타일
5+
// domains: ["codeit-images.codeit.com"],
6+
remotePatterns: [
7+
// folder page images
8+
{
9+
protocol: "https",
10+
hostname: "codeit-images.codeit.com",
11+
},
12+
{
13+
protocol: "https",
14+
hostname: "yt3.googleusercontent.com",
15+
},
16+
{
17+
protocol: "https",
18+
hostname: "assets.vercel.com",
19+
},
20+
{
21+
protocol: "https",
22+
hostname: "s.pstatic.net",
23+
},
24+
{
25+
protocol: "https",
26+
hostname: "storage.googleapis.com",
27+
},
28+
{
29+
protocol: "https",
30+
hostname: "i1.daumcdn.net",
31+
},
32+
{
33+
protocol: "https",
34+
hostname: "website-prisma.vercel.app",
35+
},
36+
{
37+
protocol: "https",
38+
hostname: "testing-library.com",
39+
},
40+
{
41+
protocol: "https",
42+
hostname: "storybook.js.org",
43+
},
44+
{
45+
protocol: "https",
46+
hostname: "github.com",
47+
},
48+
{
49+
protocol: "https",
50+
hostname: "legacy.reactjs.org",
51+
},
52+
{
53+
protocol: "https",
54+
hostname: "codeit.kr",
55+
},
56+
57+
// shared page images
58+
{
59+
protocol: "https",
60+
hostname: "codeit-frontend.codeit.com",
61+
},
62+
{
63+
protocol: "https",
64+
hostname: "reactjs.org",
65+
},
66+
{
67+
protocol: "https",
68+
hostname: "tanstack.com",
69+
},
70+
{
71+
protocol: "https",
72+
hostname: "static.cdninstagram.com",
73+
},
74+
],
75+
},
76+
77+
output: "standalone",
78+
};
79+
80+
export default nextConfig;

0 commit comments

Comments
 (0)