-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore, style : 프로젝트 아키텍처 세팅 #14
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Empty file.
Binary file not shown.
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,6 @@ | ||
import { style } from "@vanilla-extract/css"; | ||
|
||
export const container = style({ | ||
padding: 10, | ||
background: "green", | ||
}); |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import React from "react"; | ||
import * as styles from "./page.css"; | ||
|
||
const Home = () => { | ||
return <div />; | ||
return <div className={styles.container}>hello</div>; | ||
}; | ||
|
||
export default Home; |
Empty file.
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,20 @@ | ||
interface Config { | ||
baseURL: string; | ||
nodeEnv: "development" | "production" | "test"; | ||
clientUrl: string; | ||
serviceName: string; | ||
} | ||
|
||
const createConfig: () => Config = () => { | ||
if (!process.env.NEXT_PUBLIC_SERVER_URL) throw new Error("no api server url"); | ||
if (!process.env.NODE_ENV) throw new Error("no node env"); | ||
|
||
return { | ||
baseURL: process.env.NEXT_PUBLIC_SERVER_URL, | ||
nodeEnv: process.env.NODE_ENV, | ||
clientUrl: typeof window !== "undefined" ? window.location.origin : "", | ||
serviceName: "부마위키", | ||
}; | ||
}; | ||
|
||
export default createConfig(); |
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,7 @@ | ||
const authority = { | ||
ADMIN: "ADMIN", | ||
READONLY: "BANNED", | ||
USER: "USER", | ||
}; | ||
|
||
export default authority; |
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,24 @@ | ||
const exception = { | ||
code: { | ||
IMG_400_1: "IMG-400-1", | ||
DOCS_404_1: "DOCS-404-1", | ||
DOCS_404_2: "DOCS-404-2", | ||
DOCS_403_1: "DOCS-403-1", | ||
COMMON_403_1: "COMMON-403-1", | ||
USER_403_1: "USER-403-1", | ||
DOCS_403_2: "DOCS-403-2", | ||
TOKEN_403_1: "TOKEN-403-1", | ||
TOKEN_403_2: "TOKEN-403-2", | ||
TOKEN_403_3: "TOKEN-403-3", | ||
USER_404_1: "USER-404-1", | ||
}, | ||
status: { | ||
SUCCESS: 200, | ||
NOT_FOUND: 404, | ||
FORBIDDEN: 403, | ||
BAD_REQUEST: 400, | ||
SERVER_ERROR: 500, | ||
}, | ||
}; | ||
|
||
export default exception; |
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,14 @@ | ||
import Contribute from "@/types/contribute.interface"; | ||
import { atom } from "jotai"; | ||
|
||
export const userContext = atom({ | ||
key: "userContext", | ||
default: { | ||
id: 0, | ||
email: "", | ||
nickName: "", | ||
authority: "", | ||
contributeDocs: [] as Array<Contribute>, | ||
isLogin: false, | ||
}, | ||
}); |
Empty file.
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,5 @@ | ||
const LayoutProvider = ({ children }: React.PropsWithChildren) => { | ||
return <>{children}</>; | ||
}; | ||
|
||
export default LayoutProvider; | ||
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,19 @@ | ||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | ||
|
||
const queryClient = new QueryClient({ | ||
defaultOptions: { | ||
queries: { | ||
refetchOnWindowFocus: false, | ||
enabled: true, | ||
retry: 0, | ||
}, | ||
}, | ||
}); | ||
|
||
const ReactQueryProvider = ({ children }: React.PropsWithChildren) => { | ||
return ( | ||
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider> | ||
); | ||
}; | ||
|
||
export default ReactQueryProvider; |
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,16 @@ | ||
import React, { PropsWithChildren } from "react"; | ||
import { Provider as JotaiProvider } from "jotai"; | ||
import ReactQueryProvider from "./ReactQueryProvider"; | ||
import LayoutProvider from "./LayoutProvider"; | ||
|
||
const AppProvider = ({ children }: PropsWithChildren) => { | ||
return ( | ||
<ReactQueryProvider> | ||
<JotaiProvider> | ||
<LayoutProvider>{children}</LayoutProvider> | ||
</JotaiProvider> | ||
</ReactQueryProvider> | ||
); | ||
}; | ||
|
||
export default AppProvider; |
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LayoutProvider의 존재 이유가 궁금합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LayoutProvider는 아직 작성된 레이아웃이 없어 빈 프레임을 사용했습니다!
보통 공통적으로 들어가는 레이아웃이나 형식을 지정할 때 사용하려고 생각 중입니다!
제가 진행했던 BSM 서비스에서는 다음과 같이 사용합니다😀