Open
Conversation
- eslint : ++, -- 연산자 사용 허용 - prettier: Windows 스타일로 작성된 줄바꿈(CRLF) 감지 시 Unix/Linux 스타일로 작성된 줄바꿈(LF)으로 자동 변경
Rose-my
reviewed
Jun 28, 2024
Rose-my
left a comment
There was a problem hiding this comment.
이번 과제도 너무 수고많으셨어요 ...! 매번 코드리뷰할때마다 많이 배워갔는데 마지막까지 최고입니당
아지토 화이팅 > <
| @@ -0,0 +1,68 @@ | |||
| "use client"; | |||
| import { useAtom } from "jotai"; | |||
There was a problem hiding this comment.
teamValue 상태를 jotai의 useAtom을 통해 관리하시는군요! 상태 관리에 대한 이해가 높으신것 같아요...! 배워갑니다 !!
| import GenSelectBtn from "@/components/common/GenSelectBtn"; | ||
| import { useMutation, useQueryClient } from "@tanstack/react-query"; | ||
| import { postTeamVote } from "@/api/demo-day"; | ||
| import toast from "react-hot-toast"; |
Comment on lines
+40
to
+42
| export const getUserInfo = async (): Promise<UserInfoRes> => { | ||
| return await instance.get("/auth"); | ||
| }; |
There was a problem hiding this comment.
타입스크립트의 타입 안전성을 위해서 반환값을 지정할 수도 있을 것 같아요!
There was a problem hiding this comment.
Suggested change
| export const getUserInfo = async (): Promise<UserInfoRes> => { | |
| return await instance.get("/auth"); | |
| }; | |
| export const getUserInfo = async (): Promise<UserInfoRes> => { | |
| try { | |
| const response = await instance.get<UserInfoRes>("/auth"); | |
| return response.data; | |
| } catch (error) { | |
| console.error("GetUserInfo Error:", error); | |
| throw error; | |
| } |
Dahn12
reviewed
Jun 28, 2024
Dahn12
left a comment
There was a problem hiding this comment.
마지막 스터디도 수고 많으셨습니다! 항상 꼼꼼하게 진행하신다는 생각이 들어서 아지토도 기대가 많이 됩니다!
There was a problem hiding this comment.
아지토 팀은 항상 이런 기본 설정들(?)을 정말 잘 해주시는 거 같아요...! 👍
| <BigSelectBtn btnTexts={["FRONT-END", "파트장 투표"]} /> | ||
| </Link> | ||
| <Link href="/leader/result-front"> | ||
| <GenSelectBtn>결과보기</GenSelectBtn> |
| } | ||
| } catch (loginError) { | ||
| console.error("로그인 시도 실패:", loginError); | ||
| toast.error("회원가입은 성공했지만, 자동 로그인이 실패했습니다."); |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🐻 배포 링크
https://react-vote-19th.vercel.app/
👩💻 구현 기능
유담
나현
기술 스택
React-hook-form?
제어 컴포넌트 vs 비제어 컴포넌트
제어 컴포넌트:
비제어 컴포넌트:
React Hook Form 사용 이유
React Hook Form의 장점:
로그인, 회원가입 페이지
로직 설명
트러블 슈팅
Mixed-content 에러 해결을 위한 rewrites 설정
문제
HTTPS로 배포된 사이트에서 HTTP 서버와 통신 시 Mixed-content 에러 발생.
해결 방법
next.config.js에rewrites설정을 추가하여 모든 api 요청을 HTTP 서버로 프록시하도록 설정.예시
그냥 백엔드가 https로 배포하면 안됨?
맞아요..^^ 근데 도메인도 사야하고 이미 아지토는 운영중인 사이트라 그 도메인을 같이 쓰기도 애매했습니다. 사실 조유담 이름으로 된 도메인이 하나 있는데 그걸 쓸 걸 하는 생각도 드네요.