-
Notifications
You must be signed in to change notification settings - Fork 1
[Init] 라우팅 세팅 #23
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
Merged
Merged
[Init] 라우팅 세팅 #23
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d9446f1
add: 주요 페이지 파일 추가 (#12)
hummingbbird af071f1
remove: 불필요한 .gitkeep 파일 삭제 (#12)
hummingbbird f537245
add: 필요한 페이지 추가 (#12)
hummingbbird c4de6a9
feat: 라우팅 추가 및 연결 (#12)
hummingbbird b0e6a1c
feat: appRoutes 추가 (#12)
hummingbbird d9d93dc
feat: paths 테스트 반영 (#12)
hummingbbird d446279
Merge branch 'dev' into init/#12/route-setting
hummingbbird 4e8db38
rename: 파일 이름 컨벤션대로 변경 (#12)
hummingbbird ca45fe8
move: 폴더 구조 수정 (#12)
hummingbbird 353c0b2
add: 의존성 설치 (#12)
hummingbbird e2eebbb
Merge branch 'dev' into init/#12/route-setting
hummingbbird e3e4516
move: experience-detail 페이지 폴더 구조 수정 (#12)
hummingbbird a5bd326
move: 폴더 구조 수정 (#12)
hummingbbird e8265f2
feat: 바뀐 폴더 구조 반영 (#12)
hummingbbird 9e0c652
chore: useParams 타입 지정 (#12)
hummingbbird 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
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,18 @@ | ||
| import { createBrowserRouter } from "react-router-dom"; | ||
|
|
||
| import { protectedRoutes } from "./protected-routes"; | ||
| import { publicRoutes } from "./public-routes"; | ||
|
|
||
| export const router = createBrowserRouter([ | ||
| { | ||
| path: "/", | ||
| // element: <RootLayout />, TODO: RootLayout 추가 | ||
| children: [ | ||
| ...publicRoutes, | ||
|
|
||
| // TODO: auth에 따른 처리 추가 | ||
| ...protectedRoutes, | ||
| // TODO: paths 이외의 경로 접근 시 error 처리 | ||
| ], | ||
| }, | ||
| ]); |
This file contains hidden or 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,18 @@ | ||
| export const ROUTES = { | ||
| HOME: "/", | ||
| LOGIN: "/login", | ||
| ONBOARDING: "/onboarding", | ||
| COMPANY: (id = ":id") => `/company/${id}`, // 기업 상세 | ||
| EXPERIENCE_MATCHING: "/experience-matching", // 경험x기업 매칭 | ||
|
|
||
| MATCHING_LIST: "/matching", // 경험x기업 매칭 결과 리스트 | ||
| MATCHING_DETAIL: (id = ":id") => `/matching/${id}`, // 매칭 결과 상세 | ||
|
|
||
| EXPERIENCE: "/experience", // 경험 목록 | ||
| EXPERIENCE_CREATE: "/experience/create", // 경험 생성 | ||
| EXPERIENCE_DETAIL: (id = ":id") => `/experience/${id}`, // 경험 상세 | ||
| EXPERIENCE_EDIT: (id = ":id") => `/experience/${id}/edit`, // 경험 수정 | ||
|
|
||
| MYPAGE: "/mypage", | ||
| BOOKMARK: "/bookmark", | ||
| }; |
This file contains hidden or 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,42 @@ | ||
| import { BookmarkPage } from "@/pages/bookmark/bookmark-page"; | ||
| import { CompanyDetailPage } from "@/pages/company-detail/company-detail-page"; | ||
| import { ExperiencePage } from "@/pages/experience/experience-page"; | ||
| import { ExperienceDetailPage } from "@/pages/experience-detail/experience-detail-page"; | ||
| import { ExperienceMatchingPage } from "@/pages/experience-matching/experience-matching-page"; | ||
| import { HomePage } from "@/pages/home/home-page"; | ||
| import { MatchingDetailPage } from "@/pages/matching-detail/matching-detail-page"; | ||
| import { MatchingListPage } from "@/pages/matching-list/matching-list-page"; | ||
| import { MyPage } from "@/pages/my-page/my-page"; | ||
| import { OnboardingPage } from "@/pages/onboarding/onboarding-page"; | ||
|
|
||
| import { ROUTES } from "./paths"; | ||
|
|
||
| export const protectedRoutes = [ | ||
| { path: ROUTES.HOME, element: <HomePage /> }, | ||
| { path: ROUTES.ONBOARDING, element: <OnboardingPage /> }, | ||
|
|
||
| { path: ROUTES.COMPANY(), element: <CompanyDetailPage /> }, | ||
| { path: ROUTES.EXPERIENCE_MATCHING, element: <ExperienceMatchingPage /> }, | ||
|
|
||
| // 매칭 결과 | ||
| { path: ROUTES.MATCHING_LIST, element: <MatchingListPage /> }, | ||
| { path: ROUTES.MATCHING_DETAIL(), element: <MatchingDetailPage /> }, | ||
|
|
||
| // 경험 | ||
| { path: ROUTES.EXPERIENCE, element: <ExperiencePage /> }, | ||
| { | ||
| path: ROUTES.EXPERIENCE_CREATE, | ||
| element: <ExperienceDetailPage mode="create" />, | ||
| }, | ||
| { | ||
| path: ROUTES.EXPERIENCE_DETAIL(), | ||
| element: <ExperienceDetailPage mode="view" />, | ||
| }, | ||
| { | ||
| path: ROUTES.EXPERIENCE_EDIT(), | ||
| element: <ExperienceDetailPage mode="edit" />, | ||
| }, | ||
|
|
||
| { path: ROUTES.MYPAGE, element: <MyPage /> }, | ||
| { path: ROUTES.BOOKMARK, element: <BookmarkPage /> }, | ||
| ]; |
This file contains hidden or 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 @@ | ||
| import { LoginPage } from "@/pages/login/login-page"; | ||
|
|
||
| import { ROUTES } from "./paths"; | ||
|
|
||
| export const publicRoutes = [{ path: ROUTES.LOGIN, element: <LoginPage /> }]; |
Empty file.
This file contains hidden or 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,9 @@ | ||
| const BookmarkPage = () => { | ||
| return ( | ||
| <div> | ||
| <h1>Welcome to the Bookmark Page</h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { BookmarkPage }; |
This file contains hidden or 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 { useParams } from "react-router-dom"; | ||
|
|
||
| const CompanyDetailPage = () => { | ||
| const { id } = useParams<{ id: string }>(); | ||
| return ( | ||
| <div> | ||
| <h1>Company Detail Page - {id}</h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { CompanyDetailPage }; |
This file contains hidden or 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 @@ | ||
| import { useParams } from "react-router-dom"; | ||
|
|
||
| import { ExperienceForm } from "./ui/experience-form"; | ||
| import { ExperienceViewer } from "./ui/experience-viewer"; | ||
|
|
||
| type mode = "view" | "edit" | "create"; | ||
|
|
||
| interface ExperiencePageProps { | ||
| mode: mode; | ||
| } | ||
|
|
||
| const ExperienceDetailPage = ({ mode }: ExperiencePageProps) => { | ||
| const { id } = useParams<{ id: string }>(); | ||
| switch (mode) { | ||
| case "view": | ||
| return <ExperienceViewer />; | ||
|
|
||
| case "create": | ||
| case "edit": | ||
| return <ExperienceForm mode={mode} id={id} />; | ||
| } | ||
| }; | ||
|
|
||
| export { ExperienceDetailPage }; |
This file contains hidden or 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 @@ | ||
| type mode = "create" | "edit"; | ||
|
|
||
| interface ExperienceFormProps { | ||
| mode: mode; | ||
| id?: string; | ||
| } | ||
|
|
||
| const ExperienceForm = ({ mode, id }: ExperienceFormProps) => { | ||
| // TODO: mode에 따라 isEdit 모드 분기 처리 | ||
| return ( | ||
| <div> | ||
| <h1> | ||
| Experience Form - {mode} {mode === "edit" && `${id}`} | ||
| </h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { ExperienceForm }; |
This file contains hidden or 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 { useParams } from "react-router-dom"; | ||
|
|
||
| const ExperienceViewer = () => { | ||
| const { id } = useParams<{ id: string }>(); | ||
| return ( | ||
| <div> | ||
| <h1>Experience Viewer - {id}</h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { ExperienceViewer }; |
This file contains hidden or 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,9 @@ | ||
| const ExperienceMatchingPage = () => { | ||
| return ( | ||
| <div> | ||
| <h1>Welcome to the Experience Matching Page</h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { ExperienceMatchingPage }; |
Empty file.
This file contains hidden or 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,9 @@ | ||
| const ExperiencePage = () => { | ||
| return ( | ||
| <div> | ||
| <h1>Experience List Page</h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { ExperiencePage }; |
This file contains hidden or 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
Empty file.
This file contains hidden or 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,9 @@ | ||
| const LoginPage = () => { | ||
| return ( | ||
| <div> | ||
| <h1>Welcome to the Login Page</h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { LoginPage }; |
This file contains hidden or 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 { useParams } from "react-router-dom"; | ||
|
|
||
| const MatchingDetailPage = () => { | ||
| const { id } = useParams<{ id: string }>(); | ||
| return ( | ||
| <div> | ||
| <h1>Welcome to the Matching Detail Page - {id}</h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { MatchingDetailPage }; |
This file contains hidden or 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,9 @@ | ||
| const MatchingListPage = () => { | ||
| return ( | ||
| <div> | ||
| <h1>Welcome to the Matching List Page</h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { MatchingListPage }; |
Empty file.
This file contains hidden or 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,9 @@ | ||
| const MyPage = () => { | ||
| return ( | ||
| <div> | ||
| <h1>Welcome to the My Page</h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { MyPage }; |
Empty file.
This file contains hidden or 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,9 @@ | ||
| const OnboardingPage = () => { | ||
| return ( | ||
| <div> | ||
| <h1>Welcome to the Onboarding Page</h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { OnboardingPage }; |
Empty file.
This file contains hidden or 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,9 @@ | ||
| const RegisterPage = () => { | ||
| return ( | ||
| <div> | ||
| <h1>Welcome to the Register Page</h1> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { RegisterPage }; |
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.
기업 분석 세부 페이지에 대한 라우팅은
company-detail로 처리되고 있는 것 같은데,혹시 같은 의미로 구성하신 폴더라면 제거해줘도 좋을 것 같아요 ❣️
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.
크아악 초기 세팅할 당시에 만들었던 파일인데 제거하는 걸 깜빡했네요 감사합니다 !
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.
로컬에서 해당 폴더가 추적이 안 돼서 보이지 않네요 .. 🥲 추후에 다른 작업 진행하면서 제거 해도 괜찮을까요?
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.
아이구 물론입니다~ ^0^