-
Notifications
You must be signed in to change notification settings - Fork 41
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
feat: 8팀 2주차 작업 내용 구현 #65
Conversation
충돌부분이 많아서 설정까지 수정해서 올리겠습니다 |
기본 레이아웃 및 css 적용했습니다. |
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.
고생하셨습니다~ 👍 👍
src/main.tsx
Outdated
const router = createBrowserRouter([ | ||
{ | ||
path: '/', | ||
element: <App />, | ||
errorElement: <ErrorPage />, | ||
}, | ||
{ | ||
path: '/article/:id', | ||
element: <Article />, | ||
}, | ||
{ | ||
path: '/login', | ||
element: <Login />, | ||
}, | ||
{ | ||
path: '/register', | ||
element: <Register />, | ||
}, | ||
]); |
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.
Navbar, Footer는 각 페이지마다 고정적으로 들어가서 Layout 컴포넌트를 하나 만들고, 그 안에서 Navbar, Footer를 고정시켜줘도 괜찮을 것 같아요.
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.
현재는 라우트가 많은편이 아니라서 문제는 안되지만, 각각의 라우트를 상수로 관리해서 routes와 같은 객체 배열을 만들고 createBrowserRouter에 넘겨줘도 괜찮을 것 같아요.
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.
path는 상수로 관리해줘도 좋을 것 같네요~
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.
해당사항 반영해서 수정했습니다!
src/main.tsx
Outdated
import '../public/styles/main.css'; | ||
import '../public/styles/ionicons.min.css'; | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/client'; | ||
import App from './App'; | ||
import { createBrowserRouter, RouterProvider } from 'react-router-dom'; | ||
import ErrorPage from './pages/ErrorPage'; | ||
import Article from './pages/Article'; | ||
import Login from './pages/Login'; | ||
import Register from './pages/Register'; |
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.
import 개행이 들어가면 더 깔끔할 것 같아요.
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.
확인해서 반영했습니다!
src/pages/article.tsx
Outdated
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.
article.tsx -> Article.tsx가 되어야 할 것 같아요~
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.
로컬에서 대소문자 변경이 반영이 안된 것 같아요~
git 대소문자 요렇게 한번 해결해보실래요?
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.
errorpage.tsx -> ErrorPage.tsx 여기도 요렇게 되어야 할 것 같네요!?
src/pages/errorpage.tsx
Outdated
}; | ||
return ( | ||
<div> | ||
<button onClick={onClick}>잘못된 경로입니다</button> |
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.
html button에 명시적으로 type을 잡아주시는 건 어떻게 생각하시나요~?
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.
좋은생각입니다! 임시적으로 에러페이지를 만들어놔서 type 지정 후 추후 작업에 반영할게요!
src/main.tsx
Outdated
|
||
import App from './App'; | ||
|
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.
의도가 아니여서 수정했습니다!
src/main.tsx
Outdated
const router = createBrowserRouter([ | ||
{ |
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.
해당사항 반영해서 수정했습니다! 감사합니다!
📌 이슈 링크
📖 작업 배경
🛠️ 구현 내용
💡 참고사항
🖼️ 스크린샷