-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Dev-FE-1/feat/router-#3
Feat/router #3 라우터 초기설정
- Loading branch information
Showing
15 changed files
with
150 additions
and
23 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
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,17 +1,37 @@ | ||
import { css } from '@emotion/react' | ||
import './App.css' | ||
import { createBrowserRouter, RouterProvider } from 'react-router-dom' | ||
|
||
function App() { | ||
const papagraphStyles = css` | ||
font-weight: bold; | ||
font-size: 64px; | ||
text-decoration: underline; | ||
` | ||
return ( | ||
<> | ||
<p css={papagraphStyles}>Don't be late!!</p> | ||
</> | ||
) | ||
} | ||
import CreatePlaylist from './pages/CreatePlaylist' | ||
import EditProfile from './pages/EditProfile' | ||
import Follow from './pages/Follow' | ||
import Login from './pages/Login' | ||
import Home from './pages/Home' | ||
import Page404 from './pages/Page404' | ||
import Playlist from './pages/Playlist' | ||
import Profile from './pages/Profile' | ||
import Search from './pages/Search' | ||
|
||
const router = createBrowserRouter([ | ||
{ | ||
path: '/', | ||
element: <Home />, | ||
errorElement: <Page404 />, | ||
children: [ | ||
{ path: '/login', element: <Login /> }, | ||
{ path: '/search', element: <Search /> }, | ||
{ path: '/playlist', element: <Playlist /> }, | ||
{ path: '/createplaylist', element: <CreatePlaylist /> }, | ||
{ | ||
path: '/profile', | ||
element: <Profile />, | ||
children: [ | ||
{ path: 'editprofile', element: <EditProfile /> }, | ||
{ path: 'follow', element: <Follow /> }, | ||
], | ||
}, | ||
], | ||
}, | ||
]) | ||
|
||
const App = () => <RouterProvider router={router} /> | ||
|
||
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 |
---|---|---|
|
@@ -13,10 +13,6 @@ | |
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
test { | ||
font-size: 0; | ||
} | ||
|
||
a { | ||
font-weight: 500; | ||
color: #646cff; | ||
|
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 CreatePlaylist = () => { | ||
return <div>CreatePlaylist</div> | ||
} | ||
|
||
export default CreatePlaylist |
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 EditProfile = () => { | ||
return <div>EditProfile</div> | ||
} | ||
|
||
export default EditProfile |
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 Follow = () => { | ||
return <div>Follow</div> | ||
} | ||
|
||
export default Follow |
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 { Outlet } from 'react-router-dom' | ||
|
||
const Home = () => { | ||
return ( | ||
<div> | ||
<h1>Home</h1> | ||
<Outlet /> | ||
</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,5 @@ | ||
const Login = () => { | ||
return <div>Login</div> | ||
} | ||
|
||
export default Login |
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 styled from '@emotion/styled' | ||
|
||
const Page404 = () => { | ||
return <StyledContainer>404</StyledContainer> | ||
} | ||
|
||
export default Page404 | ||
|
||
const StyledContainer = styled.div` | ||
font-size: 3rem; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100vw; | ||
` |
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 Playlist = () => { | ||
return <div>Playlist</div> | ||
} | ||
|
||
export default Playlist |
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 Profile = () => { | ||
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,5 @@ | ||
const Search = () => { | ||
return <div>Search</div> | ||
} | ||
|
||
export default Search |