Skip to content

Commit

Permalink
merge: 컨플릭트 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
bokeeeey committed Jun 11, 2024
2 parents 57ae781 + 350c8a0 commit 170b2a7
Show file tree
Hide file tree
Showing 72 changed files with 3,052 additions and 531 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage
Expand Down Expand Up @@ -34,3 +35,4 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
node_modules
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ bun dev

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

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

[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`.

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

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

Expand Down
31 changes: 31 additions & 0 deletions app/folder/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Footer } from "@/src/components/Footer";
import { Header } from "@/src/components/Header";
import LinkManager from "@/src/components/LinkManager/LinkManager";
import { END_POINT } from "@/src/constants";
import getFormattedLinks from "@/src/utils/getFormattedLinks";

async function getFetchData(url: string) {
try {
const res = await fetch(url);
const result = await res.json();
return result;
} catch (error) {
if (error instanceof Error) {
console.error(error.message);
}
}
}

export default async function FolderPage() {
const linksData = await getFetchData(END_POINT.LINKS);
const links = getFormattedLinks(linksData.data);
const favorites = await getFetchData(END_POINT.FOLDERS);

return (
<>
<Header />
<LinkManager links={links} favorites={favorites.data} />
<Footer />
</>
);
}
15 changes: 15 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import "@/src/styles/global.scss";
import { ReactNode } from "react";

export const metadata = {
title: "Linkbrary",
description: "bokeeey weeklyMission",
};

export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="ko">
<body>{children}</body>
</html>
);
}
3 changes: 3 additions & 0 deletions app/page.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.input {
padding: 200px;
}
12 changes: 12 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Auth from "@/src/components/Auth/Auth";
import styles from "./page.module.scss";

export default function Home() {
return (
<>
<div className={styles.input}>
<Auth />
</div>
</>
);
}
31 changes: 31 additions & 0 deletions app/shared/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Footer } from "@/src/components/Footer";
import { Header } from "@/src/components/Header";
import LinkManager from "@/src/components/LinkManager/LinkManager";
import { END_POINT } from "@/src/constants";

async function getFetchData(url: string) {
try {
const res = await fetch(url);
const result = await res.json();
return result;
} catch (error) {
if (error instanceof Error) {
console.error(error.message);
}
}
}

export default async function sharedPage() {
const sharedPageDatas = await getFetchData(END_POINT.SHARED_LINKS);

return (
<>
<Header />
<LinkManager
links={sharedPageDatas.folder.links}
userProfile={sharedPageDatas.folder}
/>
<Footer />
</>
);
}
13 changes: 13 additions & 0 deletions app/signin/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// import Auth from "@/src/components/Auth/Auth";
// import AuthHookForm from "@/src/components/Auth/AuthHookForm";
import SignInForm from "@/src/components/Auth/SignInForm/SignInForm";

export default function signinPage() {
return (
<>
{/* <Auth /> */}
{/* <AuthHookForm /> */}
<SignInForm />
</>
);
}
80 changes: 80 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
// domains는 권장하지 않는 스타일
// domains: ["codeit-images.codeit.com"],
remotePatterns: [
// folder page images
{
protocol: "https",
hostname: "codeit-images.codeit.com",
},
{
protocol: "https",
hostname: "yt3.googleusercontent.com",
},
{
protocol: "https",
hostname: "assets.vercel.com",
},
{
protocol: "https",
hostname: "s.pstatic.net",
},
{
protocol: "https",
hostname: "storage.googleapis.com",
},
{
protocol: "https",
hostname: "i1.daumcdn.net",
},
{
protocol: "https",
hostname: "website-prisma.vercel.app",
},
{
protocol: "https",
hostname: "testing-library.com",
},
{
protocol: "https",
hostname: "storybook.js.org",
},
{
protocol: "https",
hostname: "github.com",
},
{
protocol: "https",
hostname: "legacy.reactjs.org",
},
{
protocol: "https",
hostname: "codeit.kr",
},

// shared page images
{
protocol: "https",
hostname: "codeit-frontend.codeit.com",
},
{
protocol: "https",
hostname: "reactjs.org",
},
{
protocol: "https",
hostname: "tanstack.com",
},
{
protocol: "https",
hostname: "static.cdninstagram.com",
},
],
},

output: "standalone",
};

export default nextConfig;
Loading

0 comments on commit 170b2a7

Please sign in to comment.