Skip to content
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

SMH-88 로그인 전 후 레이아웃 #31

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open

SMH-88 로그인 전 후 레이아웃 #31

wants to merge 6 commits into from

Conversation

ysnarmi
Copy link
Collaborator

@ysnarmi ysnarmi commented Jun 16, 2024

Jira

배경

  • 어드민 로그인 전 레이아웃
  • api 호출 환경 구성 : react query로 진행

주요 기능

  • 로그인 api 연동

사용 예시

기능에 대한 사용 예시를 자유롭게(텍스트, 코드, 스크린샷) 작성합니다.

스크린샷 2024-06-16 오후 4 55 11

기타

  • svg import 하면 계속해서 에러 발생..ㅠㅠ
  • app 구조가 처음이라, 디렉토리 구조 확인 필요 @juchanhwang 확인해주세용!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정적인 파일들, 즉 로고, 파비콘 같은 경우는 src 폴더 바깥 public폴더에 저장하는게 어떨까요!

추가로, src 내부에서 사용할 이미지 파일들은 src > assets하위에서 관리하는 것이 어떨까요!
src > assets > icons
그리고, styles 폴더 하위의 파일은 css파일 위주로 사용하는 것이 어떨까요!

https://medium.com/@atenanavidii/choosing-between-public-and-src-folder-for-assets-file-in-a-react-app-fec504477149

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

서버사이드와 클라이언트 사이드를 구분하기 위한 컴포넌트 분리인 것으로 이해했습니다!
페이지에 속한, 즉 독립적인 컴포넌트가 아니라면 src > components폴더에서 제외하는 것이 어떨까요?
공용으로 사용하는 컴포넌트만 여기서 관리하고, 외부에서 관심이 없는 컴포넌트는 사용하는 곳에 고립 시키는 것이 관리 포인트에서 좋다고 생각합니다!
app > login > _components > login.tsx 이런 방식으로요!

return (
<>
<Login />
</>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fragment로 감쌀 필요가 있을까요?

const LoginPage = () => <Login />

이렇게 써도 될 것 같아요!

packages/missionary-admin/src/app/layout.tsx Show resolved Hide resolved
@juchanhwang
Copy link
Collaborator

juchanhwang commented Jul 5, 2024

반영이 완료된 것은 리졸브해주시면 좋을 것 같습니다!
그리고 반영후에 슬랙이나 댓글로 알려주시면 좋을 것 같아요! 반영 후에 알림이 오는게 아니라서 제가 알 수 있는 방법이 없네용 ㅎㅎ

if (isErrorLogin) {
alert(dataLogin);
}
}, [dataLogin]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

의존성 배열에 isSuccessLoginisErrorLogin는 없어도 괜찮은 의존성인가요?

const { setLogin } = useAdminAPI();

const mutationFn = async (request: any) => {
const { data: response } = await setLogin(request);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 api 에러가 발생하면 어떻게 동작할까요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants