-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/prgrms-fe-devcourse/FEDC2_2…
- Loading branch information
Showing
14 changed files
with
164 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,5 +1,8 @@ | ||
function App() { | ||
return <></>; | ||
} | ||
import React from "react"; | ||
import AppRouter from "./routes/Router"; | ||
|
||
const App: React.FC = () => { | ||
return <AppRouter />; | ||
}; | ||
|
||
export default App; |
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,4 @@ | ||
const NotFound: React.FC = () => { | ||
return <div>404 NOT FOUND</div>; | ||
}; | ||
export default 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,4 @@ | ||
const Create: React.FC = () => { | ||
return <div>Create</div>; | ||
}; | ||
export default Create; |
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,9 @@ | ||
import { useParams } from "react-router"; | ||
|
||
const Detail: React.FC = () => { | ||
const { id } = useParams<Record<string, string>>(); | ||
|
||
console.log(id); | ||
return <div>{id}Detail</div>; | ||
}; | ||
export default 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,9 @@ | ||
import { useParams } from "react-router"; | ||
const Edit: React.FC = () => { | ||
const { id } = useParams<Record<string, string>>(); | ||
|
||
console.log(id); | ||
|
||
return <div>{id}Edit</div>; | ||
}; | ||
export default Edit; |
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,4 @@ | ||
const Home: React.FC = () => { | ||
return <div>Home</div>; | ||
}; | ||
export default 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,9 @@ | ||
import { useParams } from "react-router"; | ||
|
||
const Profile: React.FC = () => { | ||
const { id } = useParams<Record<string, string>>(); | ||
|
||
console.log(id); | ||
return <div>Profile</div>; | ||
}; | ||
export default Profile; |
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,4 @@ | ||
const Result: React.FC = () => { | ||
return <div>Result</div>; | ||
}; | ||
export default Result; |
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,4 @@ | ||
const SignIn: React.FC = () => { | ||
return <div>SignIn</div>; | ||
}; | ||
export default 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,4 @@ | ||
const SignUp: React.FC = () => { | ||
return <div>SignUp</div>; | ||
}; | ||
export default 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,30 @@ | ||
import { BrowserRouter, Routes, Route } from "react-router-dom"; | ||
import NotFound from "../pages/404"; | ||
import Create from "../pages/create"; | ||
import Detail from "../pages/detail"; | ||
import Edit from "../pages/edit"; | ||
import Home from "../pages/home"; | ||
import Profile from "../pages/profile"; | ||
import Result from "../pages/result"; | ||
import SignIn from "../pages/signIn"; | ||
import SignUp from "../pages/signUp"; | ||
|
||
const AppRouter: React.FC = () => { | ||
return ( | ||
<BrowserRouter> | ||
<Routes> | ||
<Route index element={<Home />} /> | ||
<Route path="/signIn" element={<SignIn />} /> | ||
<Route path="/signUp" element={<SignUp />} /> | ||
<Route path="/create" element={<Create />} /> | ||
<Route path="/detail/:id" element={<Detail />} /> | ||
<Route path="/profile/:id" element={<Profile />} /> | ||
<Route path="/edit/:id" element={<Edit />} /> | ||
<Route path="/result/:id" element={<Result />} /> | ||
|
||
<Route path="/*" element={<NotFound />} /> | ||
</Routes> | ||
</BrowserRouter> | ||
); | ||
}; | ||
export default AppRouter; |
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