-
Notifications
You must be signed in to change notification settings - Fork 3
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
[#10] Feat: 페이지 및 라우팅 세팅 #21
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 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
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 |
---|---|---|
@@ -1,18 +1,17 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/client'; | ||
import App from './App.tsx'; | ||
import './index.css'; | ||
import { BrowserRouter } from 'react-router-dom'; | ||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import "./index.css"; | ||
import { RouterProvider } from "react-router-dom"; | ||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | ||
|
||
import { router } from "./routes/router"; | ||
|
||
const queryClient = new QueryClient(); | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
ReactDOM.createRoot(document.getElementById("root")!).render( | ||
<React.StrictMode> | ||
<QueryClientProvider client={queryClient}> | ||
<BrowserRouter> | ||
<App /> | ||
</BrowserRouter> | ||
<RouterProvider router={router} /> | ||
</QueryClientProvider> | ||
</React.StrictMode> | ||
); |
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 @@ | ||
import React from "react"; | ||
|
||
export const Detail: React.FC = () => { | ||
return <div>Detail.page</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,3 @@ | ||
import { Detail } from "./Detail.page"; | ||
|
||
export { Detail }; |
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 @@ | ||
import React from "react"; | ||
|
||
export const Home: React.FC = () => { | ||
return <div>Home.page</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,3 @@ | ||
import { Home } from "./Home.page"; | ||
|
||
export { Home }; |
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 @@ | ||
import React from "react"; | ||
|
||
export const My: React.FC = () => { | ||
return <div>My.page</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,3 @@ | ||
import { My } from "./My.page"; | ||
|
||
export { My }; |
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 @@ | ||
import React from "react"; | ||
|
||
export const NotFound: React.FC = () => { | ||
return <div>NotFound.page</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,3 @@ | ||
import { NotFound } from "./NotFound.page"; | ||
|
||
export { NotFound }; |
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 @@ | ||
import React from "react"; | ||
|
||
export const Search: React.FC = () => { | ||
return <div>Search.page</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,3 @@ | ||
import { Search } from "./Search.page"; | ||
|
||
export { Search }; |
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 @@ | ||
import React from "react"; | ||
|
||
export const SignIn: React.FC = () => { | ||
return <div>SignIn.page</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,3 @@ | ||
import { SignIn } from "./SignIn.page"; | ||
|
||
export { SignIn }; |
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 @@ | ||
import React from "react"; | ||
|
||
export const SignUp: React.FC = () => { | ||
return <div>SignUp.page</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,3 @@ | ||
import { SignUp } from "./SignUp.page"; | ||
|
||
export { SignUp }; |
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 @@ | ||
import React from "react"; | ||
|
||
export const TransferPurchase: React.FC = () => { | ||
return <div>TransferPurchase.page</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,3 @@ | ||
import { TransferPurchase } from "./TransferPurchase.page"; | ||
|
||
export { TransferPurchase }; |
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 @@ | ||
import React from "react"; | ||
|
||
export const TransferSale: React.FC = () => { | ||
return <div>TransferSale.page</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,3 @@ | ||
import { TransferSale } from "./TransferSale.page"; | ||
|
||
export { TransferSale }; |
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 @@ | ||
import React from "react"; | ||
|
||
export const TransferWriting: React.FC = () => { | ||
return <div>TransferWriting.page</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,3 @@ | ||
import { TransferWriting } from "./TransferWriting.page"; | ||
|
||
export { TransferWriting }; |
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,59 @@ | ||
import { createBrowserRouter } from "react-router-dom"; | ||
import { Home } from "../pages/homePage"; | ||
import { NotFound } from "../pages/notFoundPage"; | ||
import { Search } from "../pages/searchPage"; | ||
import { SignUp } from "../pages/signUpPage"; | ||
import { SignIn } from "../pages/signInPage"; | ||
import { My } from "../pages/myPage"; | ||
import { TransferWriting } from "../pages/transferWritingPage"; | ||
import { TransferSale } from "../pages/transferSalePage"; | ||
import { TransferPurchase } from "../pages/transferPurchasePage"; | ||
import { Detail } from "../pages/detailPage"; | ||
|
||
export const router = createBrowserRouter([ | ||
{ | ||
path: "/", | ||
element: <Home />, | ||
errorElement: <NotFound />, | ||
}, | ||
{ | ||
path: "/search", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. path는 상수로 관리해주는게 좋을 것 같습니다! |
||
element: <Search />, | ||
errorElement: <NotFound />, | ||
}, | ||
{ | ||
path: "/signUp", | ||
element: <SignUp />, | ||
errorElement: <NotFound />, | ||
}, | ||
{ | ||
path: "/signIn", | ||
element: <SignIn />, | ||
errorElement: <NotFound />, | ||
}, | ||
{ | ||
path: "/myPage", | ||
element: <My />, | ||
errorElement: <NotFound />, | ||
}, | ||
{ | ||
path: "/hotels/new", | ||
element: <TransferWriting />, | ||
errorElement: <NotFound />, | ||
}, | ||
{ | ||
path: "/saleList", | ||
element: <TransferSale />, | ||
errorElement: <NotFound />, | ||
}, | ||
{ | ||
path: "/purchaseList", | ||
element: <TransferPurchase />, | ||
errorElement: <NotFound />, | ||
}, | ||
{ | ||
path: "/rooms", | ||
element: <Detail />, | ||
errorElement: <NotFound />, | ||
}, | ||
]); |
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.
root path 밑의 경로는 children 배열로 관리해줘도 좋을 것 같습니다~