-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
72 changed files
with
3,052 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.input { | ||
padding: 200px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.